Skip to content

Make never inferences with template literal types only in special cases #46075

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

Merged
merged 4 commits into from
Sep 27, 2021

Conversation

ahejlsberg
Copy link
Member

Fixes #45906.

Comment on lines 21897 to 21898
// upon instantiation, would collapse all the placeholders to just 'string', an an assignment check wouldn't
// fail. That would be a pointless and confusing outcome.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// upon instantiation, would collapse all the placeholders to just 'string', an an assignment check wouldn't
// fail. That would be a pointless and confusing outcome.
// upon instantiation, would collapse all the placeholders to just 'string', and an assignment check might
// succeed. That would be a pointless and confusing outcome.

@ahejlsberg ahejlsberg merged commit 26aef89 into main Sep 27, 2021
@ahejlsberg ahejlsberg deleted the fix45906 branch September 27, 2021 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Type parameter in template literal type is inferred as never
3 participants