Skip to content

Commit 5317f13

Browse files
committed
#13063 Optimization
Add isInTypeQuery as the last OR
1 parent 498568b commit 5317f13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10372,7 +10372,7 @@ namespace ts {
1037210372
// the entire control flow graph from the variable's declaration (i.e. when the flow container and
1037310373
// declaration container are the same).
1037410374
const assumeInitialized = isParameter || isOuterVariable ||
10375-
type !== autoType && type !== autoArrayType && (!strictNullChecks || isInTypeQuery(node) || (type.flags & TypeFlags.Any) !== 0) ||
10375+
type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & TypeFlags.Any) !== 0 || isInTypeQuery(node)) ||
1037610376
isInAmbientContext(declaration);
1037710377
const flowType = getFlowTypeOfReference(node, type, assumeInitialized, flowContainer);
1037810378
// A variable is considered uninitialized when it is possible to analyze the entire control flow graph

0 commit comments

Comments
 (0)