Closed arthurfiorette closed 2 years ago
You can use the --generateTypes
flag:
$ microbundle build --generateTypes=false
It won't copy your types to your output directory, so if you only distribute dist/
, you'll need to do a post-build copy yourself.
Yep! I stick them in the repo root too, to ease publishing.
For really small projects, like single-file ones, using typescript is overkill. So what I usually do is just manually write my own declaration files. The result of a simple example is something like this:
If I use
types
in my package.json, microbundle will replace that with what it could generate based on the jsdoc from theindex.js
file. I also tried with/// triple slash directives
, didn't work.Is there a way that I can tell microbundle to get that declaration file and use it?