File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change
1
+
1
2
/* @internal */
2
3
namespace ts {
3
4
export const enum ModuleInstanceState {
@@ -953,7 +954,7 @@ namespace ts {
953
954
}
954
955
if ( ( expression . kind === SyntaxKind . TrueKeyword && flags & FlowFlags . FalseCondition ||
955
956
expression . kind === SyntaxKind . FalseKeyword && flags & FlowFlags . TrueCondition ) &&
956
- ! isExpressionOfOptionalChainRoot ( expression ) && ! isQuestionQuestionExpression ( expression . parent ) ) {
957
+ ! isExpressionOfOptionalChainRoot ( expression ) && ! isNullishCoalesce ( expression . parent ) ) {
957
958
return unreachableFlow ;
958
959
}
959
960
if ( ! isNarrowingExpression ( expression ) ) {
Original file line number Diff line number Diff line change @@ -5953,7 +5953,7 @@ namespace ts {
5953
5953
return isOptionalChainRoot ( node . parent ) && node . parent . expression === node ;
5954
5954
}
5955
5955
5956
- export function isQuestionQuestionExpression ( node : Node ) {
5956
+ export function isNullishCoalesce ( node : Node ) {
5957
5957
return node . kind === SyntaxKind . BinaryExpression && ( < BinaryExpression > node ) . operatorToken . kind === SyntaxKind . QuestionQuestionToken ;
5958
5958
}
5959
5959
You can’t perform that action at this time.
0 commit comments