-
-
Notifications
You must be signed in to change notification settings - Fork 581
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
fix: add types to the exports map #1196
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! This seems correct to me.
I'm in favor of the change, but having to manually maintain two separate type files is additional burden on an already lean squad of maintainers. I'd like to see this automated if at all possible before we pull the trigger on the change. Looks like there's a CI failure there too. If that's not reproducible locally, please let us know. |
With resolution mode assertions that are available in // index.d.mts
export type { Foo, Bar } from "./index.js" assert { "resolution-mode": "require" }; |
I think the |
@perrin4869 Note: |
@RebeccaStevens It does seem to work in my other PR though, at least as far as I tested. I thought the main incompatibility between the two types of modules is how |
This PR hasn't seen any activity in over 60 days now. Because it's already been reviewed, I'd really rather not close it as abandoned. My concern about two separate type files still exists. If TS 4.7 resolves that, then I think changes to that effect can allow this to move forward. |
Is there a workaround in the meantime? It's a big shame that the types are in the package but can't be used in "type": "module" mode. |
b353836
to
3038271
Compare
Closing as abandoned. |
Rollup Plugin Name:
commonjs
,node-resolve
, andpluginutils
This PR contains:
Are tests included?
Breaking Changes?
If yes, then include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.
List any relevant issue numbers:
Description
Allows types to be imported when using
"moduleResolution": "Node16"
in TypeScript.This PR may need to be modified based on the discussion here: microsoft/TypeScript#49299- Updates made.