esm-d-ts: A NPM package and CLI + Rollup plugin for declaration generation from ESM + JSDoc w/ TS #22
typhonrt
started this conversation in
Best Practices / Patterns
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi folks,
I've been working on an automatic TS declaration generator for ESM + JSDoc for the past 1.5 years and just recently ticked it over to "beta" called esm-d-ts. It features a CLI, has a Rollup plugin, and supports modern Node (imports / exports / sub-path exports) & TS idioms. I release a pretty involved ESM first library / framework for Svelte and have put it through many advanced library construction use cases including support for re-exporting packages w/ types; IE adding the re-exported package types to the public API / declarations.
This tool is ready for a bit more prime time uptake. It can be configured flexibly from the CLI, programmatic usage, and via Rollup. I will be continuing to add even more advanced features, so check out the roadmap. There are two main options. 1) generate declarations 2) run "checkJS" w/ the log output filtered to just the source code referenced by the entry point.
I am generating completely cross-linked API docs across many sub-path exports and various libraries from the output of this tool via TypeDoc. Additionally, a very cool resource I just made public is complete API docs for the built-in TS lib declarations which can be linked to any JS / TS API docs for any symbol in the TS built-in libs creating end to end documentation. I'd be glad to discuss that more and post a few more links if there is interest.
Beta Was this translation helpful? Give feedback.
All reactions