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

Time:02-04

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

CodePudding user response:

.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.

  • Related