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

chore: declare types in package.json conditional exports #5

Merged
merged 1 commit into from
Mar 24, 2024
Merged

chore: declare types in package.json conditional exports #5

merged 1 commit into from
Mar 24, 2024

Conversation

Gelio
Copy link
Contributor

@Gelio Gelio commented Mar 23, 2024

Fixes importing this package in TypeScript. Before, it expected the types to live next to the CJS/ESM files mentioned in exports. However, the types live in a separate directory.

With this change, TypeScript will use this new explicit "types" condition to resolve types correctly.

Fixes importing this package in TypeScript. Before, it expected the
types to live next to the CJS/ESM files mentioned in `exports`. However,
the types live in a separate directory.

With this change, TypeScript will use this new explicit "types"
condition [0] to resolve types correctly.

[0]: https://www.typescriptlang.org/docs/handbook/modules/reference.html#example-explicit-types-condition
@commenthol commenthol merged commit a309763 into commenthol:master Mar 24, 2024
0 of 3 checks passed
@Gelio Gelio deleted the declare-types-in-conditional-exports branch March 24, 2024 11:39
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.

2 participants