microbundle
microbundle copied to clipboard
Built package loses type definitions upon import.
package.json:
"main": "dist/index.umd.js",
"module": "dist/index.modern.module.js",
"types": "dist/index.d.ts",
Upon importing this package in another package, our build only includes certain types, for others they are 'any'.
Our .dist folder includes hooks.d.ts, store.d.ts, & index.d.ts.
I understand this is not much info, I am unfamiliar with the microbundle package, so if you need any more info, please ask :)
Does index.d.ts
not import / use hooks.d.ts
or store.d.ts
? That's usually how the full types are consumed.
Yes, could use a reproduction here as this is little information to go on.
index.d.ts
does indeed import hooks.d.ts
& store.d.ts
. I will throw a reproduction together.
Types should just work then. Might be an issue with your editor?
I don't think so, my entire team has the issue. The types work as expected when importing the package directly, without building.