fix(ts): export types explicitly#14428
Merged
pavelfeldman merged 1 commit intomicrosoft:mainfrom May 26, 2022
Merged
Conversation
rwoll
approved these changes
May 26, 2022
900fdef to
ed88353
Compare
Member
Author
|
I won't need a test once we move to TS 4.7. We have the opposite problem though, we might need bots for earlier versions of TS. |
|
any chance for a bugfix release with this change? just noticed it didn't resolve types in native esm mode (node16 module/moduleResolution)... 😮 was going to report it using the following reproduction steps: |
Contributor
|
@AviVahl you can use the next version |
|
thanks for the tip. 👍 would be useful in own projects, but my team is using some dependencies with stable playwright peerDeps. I'm currently using |
TxHawks
added a commit
to TxHawks/react-polymorphic-types
that referenced
this pull request
Jun 26, 2022
Since the filename pointed at by `default` and `import` (`empty`) is not identical to the filename of the `d.ts` file (`index`), the top level `types` field is not enough when using `"moduleResolution":"Node16"` and TypeScript `4.7`. To fix this, `types` must be explicitly specified inside the `exports` object in addition to the top level `types` field. See [firebase/firebase-js-sdk#6300](/firebase/firebase-js-sdk/issues/6300) and [microsoft/playwright#14428](/microsoft/playwright/pull/14428)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #14348