Skip to content

Commit 12cd995

Browse files
committed
Change casts to non-null assertions
1 parent 4b2fc79 commit 12cd995

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compiler/checker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23451,7 +23451,7 @@ namespace ts {
2345123451
if (contextualType) {
2345223452
const contextualSignature = getSingleCallSignature(getNonNullableType(contextualType));
2345323453
if (contextualSignature && !contextualSignature.typeParameters) {
23454-
const context = <InferenceContext>getInferenceContext(node);
23454+
const context = getInferenceContext(node)!;
2345523455
// We have an expression that is an argument of a generic function for which we are performing
2345623456
// type argument inference. The expression is of a function type with a single generic call
2345723457
// signature and a contextual function type with a single non-generic call signature. Now check
@@ -23491,7 +23491,7 @@ namespace ts {
2349123491
if (checkMode & CheckMode.Inferential) {
2349223492
// We have skipped a generic function during inferential typing. Obtain the inference context and
2349323493
// indicate this has occurred such that we know a second pass of inference is be needed.
23494-
const context = <InferenceContext>getInferenceContext(node);
23494+
const context = getInferenceContext(node)!;
2349523495
context.flags |= InferenceFlags.SkippedGenericFunction;
2349623496
}
2349723497
}

0 commit comments

Comments
 (0)