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

Update types to work with Node16 module resolution #12097

Merged
merged 2 commits into from
Sep 28, 2023

Conversation

thecrypticace
Copy link
Contributor

@thecrypticace thecrypticace commented Sep 27, 2023

Node16 / NodeNext module resolution in TypeScript now produces objects with a default key when using export default.

The "correct" way to type CJS in TypeScript is via export = … but the problem here is there is a significant number of random limitations on what works and what doesn't. For example, you have to use namespaces to export any times — BUT — you cannot directly export a type that wasn't created in the same file — and in some cases — in the namespace.

Fixes #12092

@zanminkian
Copy link

I have tested your PR. It works.
image

@thecrypticace
Copy link
Contributor Author

Oh sweet, thanks!

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

Successfully merging this pull request may close these issues.

tailwindcss is not assignable to type 'AcceptedPlugin' in vite.config.ts
2 participants