Skip to content

chore: add TypeScript declarations (.d.ts) for public API - #417

Open
lucas-tortora wants to merge 1 commit into
holepunchto:mainfrom
lucas-tortora:chore/add-js-doc
Open

chore: add TypeScript declarations (.d.ts) for public API#417
lucas-tortora wants to merge 1 commit into
holepunchto:mainfrom
lucas-tortora:chore/add-js-doc

Conversation

@lucas-tortora

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

Copy link
Copy Markdown

Adds a standalone index.d.ts declaring the public API — typed signatures, JSDoc-style @param/@returns doc comments, and interfaces for option shapes — instead of inline source JSDoc. Wires types/files in package.json so the declarations publish. This powers generated reference docs in the Pear docs site — keeping docs in sync with source.

Companion docs-site PR: holepunchto/pear-docs#315 (merged)

Adds a standalone TypeScript declaration file for the public API, wires it up
via package.json "types", and ships it in the published "files". Keeping the
types in a separate .d.ts (no inline JSDoc) avoids source-file merge conflicts
while giving consumers IDE/tsc support.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lucas-tortora lucas-tortora changed the title chore: add JSDoc to public API chore: add TypeScript declarations (.d.ts) for public API Aug 5, 2026
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