Skip to content

Commit 509fe20

Browse files
committed
Fix semantic merge conflict
1 parent ec37677 commit 509fe20

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/compiler/checker.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,7 @@ import {
797797
mangleScopedPackageName,
798798
map,
799799
mapDefined,
800+
mapIterator,
800801
MappedSymbol,
801802
MappedType,
802803
MappedTypeNode,
@@ -912,6 +913,7 @@ import {
912913
resolveTripleslashReference,
913914
resolvingEmptyArray,
914915
RestTypeNode,
916+
returnFalse,
915917
ReturnStatement,
916918
ReverseMappedSymbol,
917919
ReverseMappedType,
@@ -23687,7 +23689,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
2368723689
const newContext = context && createInferenceContextWorker(map(context.inferences, cloneInferenceInfo), context.signature, context.flags | extraFlags, context.compareTypes);
2368823690
if (context && context.freeTypeVariables) {
2368923691
newContext.freeTypeVariables = map(context.freeTypeVariables, cloneInferenceInfo);
23690-
newContext.freeTypeVariableSourceSignatures = new Map(ts.mapIterator(context.freeTypeVariableSourceSignatures!.entries(), ([k, v]) => [k, new Map(v.entries())]));
23692+
newContext.freeTypeVariableSourceSignatures = new Map(mapIterator(context.freeTypeVariableSourceSignatures!.entries(), ([k, v]) => [k, new Map(v.entries())]));
2369123693
}
2369223694
return newContext;
2369323695
}
@@ -23954,7 +23956,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
2395423956
inferTypes(context, sourceType, templateType);
2395523957
// By passing `returnFalse` here, we select the last option inferred from any overload lists -
2395623958
// this matches historical behavior, but we can probably do better here. There's maybe a constraint we could check against?
23957-
return getInferredTypes(context, ts.returnFalse)[0] || unknownType;
23959+
return getInferredTypes(context, returnFalse)[0] || unknownType;
2395823960
}
2395923961

2396023962
function* getUnmatchedProperties(source: Type, target: Type, requireOptionalProperties: boolean, matchDiscriminantProperties: boolean): IterableIterator<Symbol> {
@@ -32281,7 +32283,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
3228132283
}
3228232284
// We pass `returnFalse` as the acceptor so the last overload of all alternatives are chosen -
3228332285
// this matches historical precedent, but there's probably a better option here.
32284-
return getSignatureInstantiation(signature, getInferredTypes(context, ts.returnFalse), isInJSFile(contextualSignature.declaration));
32286+
return getSignatureInstantiation(signature, getInferredTypes(context, returnFalse), isInJSFile(contextualSignature.declaration));
3228532287
}
3228632288

3228732289
function inferJsxTypeArguments(node: JsxOpeningLikeElement, signature: Signature, checkMode: CheckMode, context: InferenceContext, accept: (types: Type[]) => boolean): Type[] {

0 commit comments

Comments
 (0)