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 Pattern types in package.json #292

Merged
merged 3 commits into from
Oct 3, 2024

Conversation

GGomez99
Copy link
Contributor

@GGomez99 GGomez99 commented Oct 3, 2024

Fix issue: #291

Changes

Export Pattern.d.ts in the package.json to solve the issue. They are now available at ts-pattern/types.

QA

Doing the same changes from this PR in this playground fixes the TS error

package.json Outdated
Comment on lines 20 to 27
"./types": {
"require": {
"types": "./dist/types/Pattern.d.cts"
},
"import": {
"types": "./dist/types/Pattern.d.ts"
}
},
Copy link
Owner

Choose a reason for hiding this comment

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

Could you create a types/index.ts file that exports the types we need from Pattern.ts? This should make it easier to export type from other files if necessary in the future

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