Skip to content

Conversation

@Andarist
Copy link
Contributor

fixes #59668

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Aug 19, 2024
@Andarist Andarist changed the title Normalize NoInferred tuple types Normalize NoInferred tuple types in rest/spread positions Aug 19, 2024
else if (isParameter(declaration)) {
type = getWidenedTypeForVariableLikeDeclaration(declaration, /*reportErrors*/ true);
if (declaration.dotDotDotToken) {
type = normalizeNoInferSpread(type);
Copy link
Member

Choose a reason for hiding this comment

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

Maybe I'm thinking about this wrong, but shouldn't this actually be a part of expandParameters or something? IIRC that's where we normalize these out. Compared to sprinkling it around elsewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

getExpandedParameters is only used by signatureToSignatureDeclarationHelper and node builder. This change has behavioral changes for inference etc so having this getExpandedParameters wouldn't work

@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 Dec 5, 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.

Signatures with less parameters aren't assignable to compatible targets with more when their rest param is an instantiated NoInfer

3 participants