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

Rewrite type exports to match runtime code #702

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

simon-abbott
Copy link

This PR refactors the index.d.ts file to match the actual exported structure, which is important for compatibility with the tsconfig moduleResolution option being set to Node16 or NodeNext, which is the recommended value for new projects.

As far as I can tell this doesn't break any compatibility with existing projects that are still using the old value of moduleResolution: Node. It might technically break the build if anyone was using named imports of these values, but such code would fail to import at runtime anyway, so this is actually desirable.

This commit refactors the index.d.ts file to match the actual exported
structure, which is important for compatibility with the tsconfig
`moduleResolution` option being set to `Node16` or `NodeNext`, which is
the recommended value for new projects.

As far as I can tell this doesn't break any compatibility with existing
projects that are still using the old value of `moduleResolution: Node`.
It might technically break the build if anyone was using named imports
of these values, but such code would fail to import at runtime anyway,
so this is actually desirable.
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.

1 participant