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

Simplify expression type to fix build break #41942

Merged
merged 1 commit into from
Dec 12, 2020

Conversation

weswigham
Copy link
Member

Fixes the post-LKG build break introduced by the changes in #41891 by simplifying the expression type in use by widening the type of a ternary to string, rather than a union of literal types.

Copy link
Member

@ahejlsberg ahejlsberg left a comment

Choose a reason for hiding this comment

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

Yeah, that's a nasty little demonstration of exponential growth. It's interesting because the template literal expression that blows up actually only has two possible values. We could perhaps consider a template literal type representation where multiple holes can be marked as having the same origin. Such shared origin holes would be iterated in lockstep when we produce the normalized template literal union type. But for now, we should definitely merge this PR.

@weswigham weswigham merged commit 6bcb6bb into microsoft:master Dec 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants