Skip to content

docs: document the public API as TSDoc (generated from type declarations) - #13

Open
lucas-tortora wants to merge 4 commits into
holepunchto:mainfrom
lucas-tortora:chore/ts-doc
Open

docs: document the public API as TSDoc (generated from type declarations)#13
lucas-tortora wants to merge 4 commits into
holepunchto:mainfrom
lucas-tortora:chore/ts-doc

Conversation

@lucas-tortora

@lucas-tortora lucas-tortora commented Jul 21, 2026

Copy link
Copy Markdown

Document the public API as TSDoc

Adds TSDoc — @param / @returns / @throws tags plus member descriptions — to the shipped .d.ts. Everything is derived from the existing type declarations and this module's own index.js/lib source.

The README's ## API section links to the generated reference instead of inlining it, per the pattern settled on in bare-fs #44. Comments are wrapped to keep every line within 100 columns.

Reviewed against source; happy to adjust wording, scope, or split as you prefer.

🤖 Generated with Claude Code

@lucas-tortora
lucas-tortora requested a review from a team July 21, 2026 13:27
@lucas-tortora

Copy link
Copy Markdown
Author

A quick note for reviewers on CI status:

  • The chore: … Prettier … commit here is formatting-only — it aligns the generated README.md ## API block and the shipped .d.ts with prettier --check .. The repo pins Prettier ^3.x, so CI resolves the latest 3.x, which formats a little differently from older 3.x; these updates were needed for the Prettier step to pass.
  • The remaining Lint failure is pre-existing and unrelated to this change: lunte reports Identifier '<name>' has already been declared for the declare class X + declare namespace X merges in lib/{build,generate,install,test}.d.ts, plus pre-existing require-await warnings in .js files this PR does not touch. It reproduces on the base branch with no TSDoc applied (verified by running lunte on the pre-PR file), so it isn't introduced here. Out of scope for a docs-only PR, but happy to help address it separately if useful.

Generated by the pear-docs bare-refgen tooling.

…tions

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
lucas-tortora and others added 3 commits August 12, 2026 11:58
Points README ## API to docs.pears.com instead of duplicating the
generated reference inline.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Reflows comment text added by the earlier TSDoc commit so no line
exceeds 100 columns, matching the convention settled on in bare-fs #44.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Switches the README API link text from "full API reference" to
the `<module> reference` form, matching the pattern settled on in
bare-fs #44 and merged in bare-ws. Long module names use a
reference-style link to stay within 100 columns.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant