mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-24 20:44:53 -05:00
Mark IIFE signature with anySignature during contextual typing
Avoids recursion -- during batch compilation, `checkCallExpression` already sets the signature to `anySignature` as a sentinel value, the services layer calls directly into `checkParameter`, skipping `checkCallExpression` entirely. So `getContextuallyTypedParameterType` also needs to set this sentinel value.
This commit is contained in:
@@ -8606,7 +8606,12 @@ namespace ts {
|
||||
}
|
||||
return createArrayType(getUnionType(restTypes));
|
||||
}
|
||||
return checkExpression(iife.arguments[indexOfParameter]);
|
||||
const links = getNodeLinks(iife);
|
||||
const cached = links.resolvedSignature;
|
||||
links.resolvedSignature = anySignature;
|
||||
const type = checkExpression(iife.arguments[indexOfParameter]);
|
||||
links.resolvedSignature = cached;
|
||||
return type;
|
||||
}
|
||||
}
|
||||
const contextualSignature = getContextualSignature(func);
|
||||
|
||||
Reference in New Issue
Block a user