Skip to content

Fixed substition flow types of NoInfer types#59834

Closed
Andarist wants to merge 3 commits intomicrosoft:mainfrom
Andarist:fix/noinfer-substitution-types
Closed

Fixed substition flow types of NoInfer types#59834
Andarist wants to merge 3 commits intomicrosoft:mainfrom
Andarist:fix/noinfer-substitution-types

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
@typescript-bot
Copy link
Collaborator

With 6.0 out as the final release vehicle for this codebase, we're closing all PRs that don't fit the merge criteria for post-6.0 patches. If you think this was a mistake and this PR fits the post-6.0 patch criteria, please post to the 6.0 iteration issue with details (specifically, which PR and which patch criteria it satisfies).

Next steps for PRs:

  • For crash bugfixes or language service improvements, PRs are currently accepted at the typescript-go repo
  • Changes to type system behavior should wait until after 7.0, at which point mainline TypeScript development will resume in this repository with the Go codebase
  • Library file updates (lib.d.ts etc) continue to live in this repo or the DOM Generator repo as appropriate

@github-project-automation github-project-automation bot moved this from Not started to Done in PR Backlog Mar 24, 2026
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: Done

Development

Successfully merging this pull request may close these issues.

NoInfer doesn't work in string template types

3 participants