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

Export types in package.json #544

Merged
merged 2 commits into from
Apr 19, 2023
Merged

Conversation

stephenglass
Copy link
Contributor

@stephenglass stephenglass commented Apr 11, 2023

PR exports types in package.json file.

When using new bundler option for moduleResolution in tsconfig.json as part of TypeScript V5, you will receive the following error:

error TS7016: Could not find a declaration file for module 'goober'. '.../node_modules/goober/dist/goober.modern.js' implicitly has an 'any' type.
There are types at '.../node_modules/goober/goober.d.ts', but this result could not be resolved when respecting package.json "exports". The 'goober' library may need to update its package.json or typings.

Types are not exported in package.json file. When using new "bundler" option for moduleResolution field included in TypeScript V5, you will receive the following error:
error TS7016: Could not find a declaration file for module 'goober'. '.../node_modules/goober/dist/goober.modern.js' implicitly has an 'any' type.
  There are types at '.../node_modules/goober/goober.d.ts', but this result could not be resolved when respecting package.json "exports". The 'goober' library may need to update its package.json or typings.
@vercel
Copy link

vercel bot commented Apr 11, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
goober-rocks ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 18, 2023 4:42pm

@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 11, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 3906bcb:

Sandbox Source
Vanilla Configuration

package.json Outdated Show resolved Hide resolved
Co-authored-by: rodrigo <falsepopsky@protonmail.com>
Copy link
Owner

@cristianbote cristianbote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

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.

3 participants