@@ -146,6 +146,7 @@ namespace ts {
146146
147147 const anySignature = createSignature(undefined, undefined, undefined, emptyArray, anyType, /*typePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false);
148148 const unknownSignature = createSignature(undefined, undefined, undefined, emptyArray, unknownType, /*typePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false);
149+ const resolvingSignature = createSignature(undefined, undefined, undefined, emptyArray, anyType, /*typePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false);
149150
150151 const enumNumberIndexInfo = createIndexInfo(stringType, /*isReadonly*/ true);
151152
@@ -5381,7 +5382,7 @@ namespace ts {
53815382 while (i > 0) {
53825383 i--;
53835384 if (isSubtypeOfAny(types[i], types)) {
5384- types.splice(i, 1 );
5385+ orderedRemoveItemAt(types, i );
53855386 }
53865387 }
53875388 }
@@ -8761,7 +8762,7 @@ namespace ts {
87618762 // The location isn't a reference to the given symbol, meaning we're being asked
87628763 // a hypothetical question of what type the symbol would have if there was a reference
87638764 // to it at the given location. Since we have no control flow information for the
8764- // hypotherical reference (control flow information is created and attached by the
8765+ // hypothetical reference (control flow information is created and attached by the
87658766 // binder), we simply return the declared type of the symbol.
87668767 return getTypeOfSymbol(symbol);
87678768 }
@@ -12232,10 +12233,10 @@ namespace ts {
1223212233 // or that a different candidatesOutArray was passed in. Therefore, we need to redo the work
1223312234 // to correctly fill the candidatesOutArray.
1223412235 const cached = links.resolvedSignature;
12235- if (cached && cached !== anySignature && !candidatesOutArray) {
12236+ if (cached && cached !== resolvingSignature && !candidatesOutArray) {
1223612237 return cached;
1223712238 }
12238- links.resolvedSignature = anySignature ;
12239+ links.resolvedSignature = resolvingSignature ;
1223912240 const result = resolveSignature(node, candidatesOutArray);
1224012241 // If signature resolution originated in control flow type analysis (for example to compute the
1224112242 // assigned type in a flow assignment) we don't cache the result as it may be based on temporary
@@ -12247,7 +12248,7 @@ namespace ts {
1224712248 function getResolvedOrAnySignature(node: CallLikeExpression) {
1224812249 // If we're already in the process of resolving the given signature, don't resolve again as
1224912250 // that could cause infinite recursion. Instead, return anySignature.
12250- return getNodeLinks(node).resolvedSignature === anySignature ? anySignature : getResolvedSignature(node);
12251+ return getNodeLinks(node).resolvedSignature === resolvingSignature ? resolvingSignature : getResolvedSignature(node);
1225112252 }
1225212253
1225312254 function getInferredClassType(symbol: Symbol) {
0 commit comments