I want this library to be written in Javascript and exported to plain ES modules, while still publishing types (.d.ts files) for downstream users with typescript codebases.
Previously, I did this automatically by publishing with pika/pack, but that tool was deprecated and I replaced it with microbundle which doesn't automatically generate types. This issue is to restore the automatic type generation.
My preferred way to do this is to add JSDoc comments into the library, and setup tsc to read the comments and publish the .d.ts file as part of our bundle process. This has the added benefit of enabling inline editor linting/hints to the library developers. It should also fix the issue with the "uninferrable types" in our plugin system.
For more background on how this type generation process should work, see:
I want this library to be written in Javascript and exported to plain ES modules, while still publishing types (
.d.tsfiles) for downstream users with typescript codebases.Previously, I did this automatically by publishing with pika/pack, but that tool was deprecated and I replaced it with microbundle which doesn't automatically generate types. This issue is to restore the automatic type generation.
My preferred way to do this is to add JSDoc comments into the library, and setup
tscto read the comments and publish the.d.tsfile as part of our bundle process. This has the added benefit of enabling inline editor linting/hints to the library developers. It should also fix the issue with the "uninferrable types" in our plugin system.For more background on how this type generation process should work, see: