KEMBAR78
Simplify expression type to fix build break by weswigham · Pull Request #41942 · microsoft/TypeScript · GitHub
Skip to content

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
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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