File tree 1 file changed +2
-2
lines changed 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -21203,15 +21203,15 @@ namespace ts {
21203
21203
let notNullOrUndefinedFilter = false; // the aim of this filter is type has 'undefined',filter it out from result.
21204
21204
const isExpressionContainOptionalChain = isAccessExpressionContainOptionalChain(typeOfExpr.expression);
21205
21205
// ~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")) {
21207
21207
// !== undefined
21208
21208
// === ~undefined
21209
21209
// use full expression to narrow
21210
21210
propertyTypeArray = narrowUnionTypeWithPropertyPathAndExpression(<UnionType>type, typeOfExpr.expression,/* optionalChainSlice */ false);
21211
21211
notNullOrUndefinedFilter = true;
21212
21212
}
21213
21213
else {
21214
- // !== ~undefined, === undefined, !==undefined
21214
+ // !== ~undefined, === undefined
21215
21215
// use non-OptionalChain part to narrow
21216
21216
propertyTypeArray = narrowUnionTypeWithPropertyPathAndExpression(<UnionType>type, typeOfExpr.expression,/* optionalChainSlice */ true);
21217
21217
if (isExpressionContainOptionalChain) {
You can’t perform that action at this time.
0 commit comments