(flags, antecedent, expression)
| 45442 | } |
| 45443 | } |
| 45444 | function createFlowCondition(flags, antecedent, expression) { |
| 45445 | if (antecedent.flags & 1 /* FlowFlags.Unreachable */) { |
| 45446 | return antecedent; |
| 45447 | } |
| 45448 | if (!expression) { |
| 45449 | return flags & 32 /* FlowFlags.TrueCondition */ ? antecedent : unreachableFlow; |
| 45450 | } |
| 45451 | if ((expression.kind === 110 /* SyntaxKind.TrueKeyword */ && flags & 64 /* FlowFlags.FalseCondition */ || |
| 45452 | expression.kind === 95 /* SyntaxKind.FalseKeyword */ && flags & 32 /* FlowFlags.TrueCondition */) && |
| 45453 | !ts.isExpressionOfOptionalChainRoot(expression) && !ts.isNullishCoalesce(expression.parent)) { |
| 45454 | return unreachableFlow; |
| 45455 | } |
| 45456 | if (!isNarrowingExpression(expression)) { |
| 45457 | return antecedent; |
| 45458 | } |
| 45459 | setFlowNodeReferenced(antecedent); |
| 45460 | return initFlowNode({ flags: flags, antecedent: antecedent, node: expression }); |
| 45461 | } |
| 45462 | function createFlowSwitchClause(antecedent, switchStatement, clauseStart, clauseEnd) { |
| 45463 | setFlowNodeReferenced(antecedent); |
| 45464 | return initFlowNode({ flags: 128 /* FlowFlags.SwitchClause */, antecedent: antecedent, switchStatement: switchStatement, clauseStart: clauseStart, clauseEnd: clauseEnd }); |
no test coverage detected