Skip to content

Commit 12ab497

Browse files
committed
fix comment.
1 parent 52a8e26 commit 12ab497

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
@@ -21203,15 +21203,15 @@ namespace ts {
2120321203
let notNullOrUndefinedFilter = false; // the aim of this filter is type has 'undefined',filter it out from result.
2120421204
const isExpressionContainOptionalChain = isAccessExpressionContainOptionalChain(typeOfExpr.expression);
2120521205
// ~undefined means other values except undefiend. boolean, bigint....
21206-
if ((assumeTrue && literal.text !== "undefined")||(!assumeTrue && literal.text === "undefined")) {
21206+
if ((assumeTrue && literal.text !== "undefined") || (!assumeTrue && literal.text === "undefined")) {
2120721207
// !== undefined
2120821208
// === ~undefined
2120921209
// use full expression to narrow
2121021210
propertyTypeArray = narrowUnionTypeWithPropertyPathAndExpression(<UnionType>type, typeOfExpr.expression,/* optionalChainSlice */ false);
2121121211
notNullOrUndefinedFilter = true;
2121221212
}
2121321213
else {
21214-
// !== ~undefined, === undefined, !==undefined
21214+
// !== ~undefined, === undefined
2121521215
// use non-OptionalChain part to narrow
2121621216
propertyTypeArray = narrowUnionTypeWithPropertyPathAndExpression(<UnionType>type, typeOfExpr.expression,/* optionalChainSlice */ true);
2121721217
if (isExpressionContainOptionalChain) {

0 commit comments

Comments
 (0)