Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Built package loses type definitions upon import. #844

Closed
KwehDev opened this issue May 28, 2021 · 5 comments
Closed

Built package loses type definitions upon import. #844

KwehDev opened this issue May 28, 2021 · 5 comments

Comments

@KwehDev
Copy link

KwehDev commented May 28, 2021

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 :)

@rschristian
Copy link
Collaborator

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.

@KwehDev
Copy link
Author

KwehDev commented May 28, 2021

index.d.ts does indeed import hooks.d.ts & store.d.ts. I will throw a reproduction together.

@rschristian
Copy link
Collaborator

Types should just work then. Might be an issue with your editor?

@KwehDev
Copy link
Author

KwehDev commented May 28, 2021

I don't think so, my entire team has the issue. The types work as expected when importing the package directly, without building.

@rschristian
Copy link
Collaborator

Closing as no reproduction provided.

@rschristian rschristian closed this as not planned Won't fix, can't repro, duplicate, stale Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants