@@ -31996,7 +31996,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
31996
31996
// If no inferences have been made, and none of the type parameters for which we are inferring
31997
31997
// specify default types, nothing is gained from instantiating as type parameters would just be
31998
31998
// replaced with their constraints similar to the apparent type.
31999
- if (inferenceContext && (contextFlags! & ContextFlags.ContextualSignature || isReturnExpressionLiteralContext(node)) && some(inferenceContext.inferences, hasInferenceCandidatesOrDefault)) {
31999
+ if (inferenceContext && (contextFlags! & ContextFlags.Signature || isReturnExpressionLiteralContext(node)) && some(inferenceContext.inferences, hasInferenceCandidatesOrDefault)) {
32000
32000
// For contextual signatures we incorporate all inferences made so far, e.g. from return
32001
32001
// types as well as arguments to the left in a function call.
32002
32002
return instantiateInstantiableTypes(contextualType, inferenceContext.nonFixingMapper);
@@ -32463,7 +32463,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
32463
32463
if (typeTagSignature) {
32464
32464
return typeTagSignature;
32465
32465
}
32466
- const type = getApparentTypeOfContextualType(node, ContextFlags.ContextualSignature );
32466
+ const type = getApparentTypeOfContextualType(node, ContextFlags.Signature );
32467
32467
if (!type) {
32468
32468
return undefined;
32469
32469
}
@@ -40718,7 +40718,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
40718
40718
(isPropertyAssignment(parent) || isShorthandPropertyAssignment(parent) || isTemplateSpan(parent)) && isConstContext(parent.parent);
40719
40719
}
40720
40720
40721
- function checkExpressionForMutableLocation(node: Expression, checkMode? : CheckMode, forceTuple?: boolean): Type {
40721
+ function checkExpressionForMutableLocation(node: Expression, checkMode: CheckMode | undefined , forceTuple?: boolean): Type {
40722
40722
const type = checkExpression(node, checkMode, forceTuple);
40723
40723
return isConstContext(node) || isCommonJsExportedExpression(node) ? getRegularTypeOfLiteralType(type) :
40724
40724
isTypeAssertion(node) ? type :
0 commit comments