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.
I'm surprised this is needed, but it seems to be. Types are not being inferred with just the
exports.types
field. This seems to be the case on npmjs.com, in VSCode, and via the typescript compiler.Adding
types
seems to fix.A few ways to see it's not right at the moment:
Demo in typescript playground (note that if you reach into the package via
import meow from 'meow/build/index.js'
, you do get the correct types 馃し.Are The Types Wrong result
DT
icon on npmjs.com: