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

split union types #1833

Closed
wants to merge 1 commit into from
Closed

Conversation

erikbrinkman
Copy link
Collaborator

What issue does this pull request resolve?

microsoft/TypeScript#30639 introduced regressions for typescript checking of JSONSchemaType. It was suggested that https://gist.github.com/armanio123/95a33f9ad3286a7d78590eb11af293c4 might improve things. However, that diff removed the usage of UnionToIntersection which may be causing most of the regression.

After implementing this and cloning the example I saw identical performance for running tsc, a little less than 2s on my machine. I'm posting so that the original so that the OP can try this branch out to see if it fixes anything for them.

More discussion here

Meant to address #1667

What changes did you make?

Simply split out the types as in the gist.

Is there anything that requires more attention while reviewing?

You could double check I didn't make a mistake, but the tests pass, so this should be fine.

@erikbrinkman
Copy link
Collaborator Author

This didn't improve performance, and the problem was fixed in a recent release of typescript

@erikbrinkman erikbrinkman deleted the split-types branch December 14, 2021 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant