-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Limit size of union types resulting from intersection type normalization #31572
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
Conversation
@typescript-bot run dt |
Heya @ahejlsberg, I've started to run the parallelized Definitely Typed test suite on this PR at f20a4fd. You can monitor the build here. It should now contribute to this PR's status checks. |
@typescript-bot test this |
Heya @ahejlsberg, I've started to run the extended test suite on this PR at f20a4fd. You can monitor the build here. It should now contribute to this PR's status checks. |
@weswigham Yes, I'll include that as a test case. It does indeed error as expected. |
The RWC and DT runs look clean (issues are unrelated). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should look at merging #31486 as well, so this error appears in fewer common react patterns.
With this PR we estimate the size of union types created by intersection type normalization and issue an error if the estimate exceeds 100,000 constituent types. This ensures that we don't spend inordinate amounts of time and/or run out of memory.
Fixes #30050.