-
-
Notifications
You must be signed in to change notification settings - Fork 265
Description
Hi! I'm working on some changes in Storybook, and I've come across a problem. I have an entry file that is only performing a function call, without any exports. When I run it through tsup, with the dts option set, I get an empty declaration file. Typescript itself puts export {} in the .d.ts file, so that it is still treated as a module and avoids errors in other modules that import it (for side-effects, for example).
Here's an example typescript playground which shows the .d.ts being created as export {}: https://www.typescriptlang.org/play?target=7&module=1&isolatedModules=true&allowSyntheticDefaultImports=false&ts=4.8.4#code/JYWwDg9gTgLgBGAhjAFnAZlCI4HImq4DcAsAFDnoCuAdgMYzAQ1xQCmA5sAM4xtQAKAJRwA3uThw6zbhAA2bAHRyIHAbgAmEOIjipgNDriGkyAX3Ll2XXv2GmgA
But, when I create such a file with tsup and compile it, I get an empty file.
Please let me know if I can do anything to help troubleshoot or solve this.