Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can rollup plugins generate its .d.ts types with .js file

As title, how can rollup plugins generate its .d.ts types with .js file without jsdoc.

for example, I can’t find jsdoc and .ts file in rollup-plugin-commonjs (https://github.com/rollup/plugins/tree/master/packages/commonjs),
but this package has its .d.ts declaration.

rollup-plugin-commonjs

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

.d.ts files don’t need to be automatically generated from JSDoc or .ts files, they can be manually written.

It looks like the authors of this plugin decided to write the .d.ts file themselves and use vanilla JS for the actual code.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading