API Reference overview
TypeDoc generates the canonical API docs published at prompt-fn.axmdev.app. Run bun docs locally to regenerate the markdown before copying it into this section and deploying the site.
Key exports
definePrompt(config)– core factory that returns a typed async function. Config described insrc/definePrompt.ts.DefinePromptConfig/DefinePromptConfigSchema– Zod schema + TypeScript type for prompt definitions.recoverFromContentutilities – JSON recovery helpers for providers that wrap structured output in strings.createLogger– thin wrapper aroundpinofor consistent log metadata.
Workflow
- Update source code with TSDoc comments (see
project-files/typedoc-setup.md). - Run
bun docsto regenerate the markdown. - Copy the generated files into
docs-site/docs/api-reference. - Commit both the source updates and the regenerated docs so the hosted site and GitHub stay in sync.
Once the hosted docs are deployed, we will link directly to the published pages instead of the repository markdown.