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

Add lib es2015 to tsconfig #128

Merged
merged 1 commit into from
Jan 2, 2023
Merged

Conversation

SHND
Copy link
Contributor

@SHND SHND commented Jan 2, 2023

Fixing an issue when running tsc inside the examples directory from a newly cloned repo, it errors out like below:

node_modules/ts-pattern/dist/types/BuildMany.d.ts:18:110 - error TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.

18 ] : never : data extends readonly (infer a)[] ? Update<a, value, Cast<tail, PropertyKey[]>>[] : data extends Set<infer a> ? Set<Update<a, value, Cast<tail, PropertyKey[]>>> : data extends Map<infer k, infer v> ? Map<k, Update<v, value, Cast<tail, PropertyKey[]>>> : Compute<Omit<data, Cast<head, PropertyKey>> & {
                                                                                                                ~~~

node_modules/ts-pattern/dist/types/BuildMany.d.ts:18:125 - error TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.

18 ] : never : data extends readonly (infer a)[] ? Update<a, value, Cast<tail, PropertyKey[]>>[] : data extends Set<infer a> ? Set<Update<a, value, Cast<tail, PropertyKey[]>>> : data extends Map<infer k, infer v> ? Map<k, Update<v, value, Cast<tail, PropertyKey[]>>> : Compute<Omit<data, Cast<head, PropertyKey>> & {
...

How to reproduce

tsc Version 4.8.4
node Version v16.13.1
npm Version 8.1.2

cd ts-pattern/examples
npm install
tsc

@gvergnaud
Copy link
Owner

Thanks!

@gvergnaud gvergnaud merged commit 33c521b into gvergnaud:main Jan 2, 2023
@SHND SHND deleted the fix-example-tsc branch January 2, 2023 19:37
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