(node)
| 82678 | checkExpression(node.expression); |
| 82679 | } |
| 82680 | function checkIfStatement(node) { |
| 82681 | // Grammar checking |
| 82682 | checkGrammarStatementInAmbientContext(node); |
| 82683 | checkTruthinessExpression(node.expression); |
| 82684 | checkTestingKnownTruthyCallableOrAwaitableType(node.expression, node.thenStatement); |
| 82685 | checkSourceElement(node.thenStatement); |
| 82686 | if (node.thenStatement.kind === 236 /* SyntaxKind.EmptyStatement */) { |
| 82687 | error(node.thenStatement, ts.Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); |
| 82688 | } |
| 82689 | checkSourceElement(node.elseStatement); |
| 82690 | } |
| 82691 | function checkTestingKnownTruthyCallableOrAwaitableType(condExpr, body) { |
| 82692 | if (!strictNullChecks) |
| 82693 | return; |
no test coverage detected