fix: missing types entry in package exports#42
Open
jcwillox wants to merge 1 commit intojonschlinkert:masterfrom
Open
fix: missing types entry in package exports#42jcwillox wants to merge 1 commit intojonschlinkert:masterfrom
jcwillox wants to merge 1 commit intojonschlinkert:masterfrom
Conversation
Author
|
Oh yeah it is, didn't see that before 👀, the other one is probably more correct with the cts and mts types, although the combined one works too. |
typed-sigterm
approved these changes
Feb 3, 2025
typed-sigterm
left a comment
There was a problem hiding this comment.
The missing types does indeed cause errors in VS Code.
Could not find a declaration file for module 'is-plain-object'. '.../node_modules/is-plain-object/dist/is-plain-object.mjs' implicitly has an 'any' type.
There are types at '.../node_modules/is-plain-object/is-plain-object.d.ts', but this result could not be resolved when respecting package.json "exports". The 'is-plain-object' library may need to update its package.json or typings.
|
Would be nice to have this PR merged. Getting the same error due the missing export
error TS2307: Cannot find module 'is-plain-object' or its corresponding type declarations.
1 import { isPlainObject } from 'is-plain-object';
~~~~~~~~~~~~~~~~~More projects facing similar issue in this thread: |
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.
Typescript complains it can't find the types when using ESM, so I updated the
exportsconfig to includetypesand it stopped complaining 👍. With this change type checking and bundling now works in ESM projects (or I guess newer node versions/typescript versions that supportexports).