8000 Fix lints · weswigham/TypeScript@02c091b · GitHub
[go: up one dir, main page]

Skip to content

Commit 02c091b

Browse files
committed
Fix lints
1 parent 16c969c commit 02c091b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/compiler/checker.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18399,8 +18399,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
1839918399
function createBackreferenceMapper(context: InferenceContext, inference: InferenceInfo): TypeMapper {
1840018400
const inferences = context.inferences.indexOf(inference) >= 0 ? context.inferences : context.freeTypeVariables;
1840118401
Debug.assert(inferences, "Inference for backreference mapper must exist within provided context");
18402-
const index = inferences!.indexOf(inference);
18403-
const forwardInferences = inferences!.slice(index);
18402+
const index = inferences.indexOf(inference);
18403+
const forwardInferences = inferences.slice(index);
1840418404
return createTypeMapper(map(forwardInferences, i => i.typeParameter), map(forwardInferences, () => unknownType));
1840518405
}
1840618406

@@ -24096,7 +24096,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
2409624096
const group = forkInferenceContext();
2409724097
spawnAlternativeInferenceContext(group, () => {
2409824098
if (length(context.freeTypeVariables)) {
24099-
inferFromTypes(originalSource, instantiateType(originalTarget, context.nonFixingMapper))
24099+
inferFromTypes(originalSource, instantiateType(originalTarget, context.nonFixingMapper));
2410024100
}
2410124101
}, /*fork*/ false);
2410224102
joinInferenceContext(group);
@@ -24801,7 +24801,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
2480124801
/**
2480224802
* Performs the given action in every alternative inference context currently under consideration,
2480324803
* and add the resulting context(s) to a new resultant context list.
24804-
*
24804+
*
2480524805
* Call multiple times to create multiple independent forks of the existing inference engine state.
2480624806
* Call once with fork `false` to simply to do and action for every existing branch of the inference
2480724807
* engine state, while handling if those actions produce further forks of the state.
@@ -24880,7 +24880,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
2488024880
if (useOnlyCachedAlternativeRoutes && !context.freeTypeVariableSourceSignatures?.get(last(sourceStack))?.get(sourceSignatures[i])) {
2488124881
continue; // Doing a follow-up pass - ignore new alternatives that don't follow the same "route" as the first pass
2488224882
}
24883-
spawnAlternativeInferenceContext(group, () =>
24883+
spawnAlternativeInferenceContext(group, () =>
2488424884
inferFromSignature(sourceSignatures[i], targetSignatures[0])
2488524885
);
2488624886
}
@@ -25091,8 +25091,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
2509125091
// introduced.
2509225092
const freeTypeVariableMapper = makeFreeTypeVariableMapperForContext(context);
2509325093
const result: Type[] = [];
25094-
for (let i = 0; i < context.inferences.length; i++) {
25095-
result.push(instantiateType(getInferredType(context, context.inferences[i]), freeTypeVariableMapper));
25094+
for (const inference of context.inferences) {
25095+
result.push(instantiateType(getInferredType(context, inference), freeTypeVariableMapper));
2509625096
}
2509725097
// Skip calling `accept` when there's only 1 alternative to try, as it can end up fixing expression types, which we can trivially avoid
2509825098
// in simple cases when the inference result has to be used since it's the only one.

0 commit comments

Comments
 (0)
0