Skip to content

Conversation

@Andarist
Copy link
Contributor

@Andarist Andarist commented Sep 3, 2024

fixes #59826

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Sep 3, 2024
Comment on lines 16779 to 16782
if (isNoInferType(type)) {
constraints = append(constraints, (type as SubstitutionType).baseType);
return getNoInferType(getIntersectionType(constraints));
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alternatively, I was thinking about handling the substitution types created here today (with NoInfer base types and non-unknown constraints) in isNoInferType (or at least handling such at the top of inferFromTypes). I concluded this is better and less error-prone though

@typescript-bot typescript-bot added For Backlog Bug PRs that fix a backlog bug and removed For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Backlog Bug PRs that fix a backlog bug

Projects

Status: Not started

Development

Successfully merging this pull request may close these issues.

NoInfer doesn't work in string template types

2 participants