(expr)
| 45369 | return isNarrowableReference(expr) || ts.isOptionalChain(expr) && containsNarrowableReference(expr.expression); |
| 45370 | } |
| 45371 | function hasNarrowableArgument(expr) { |
| 45372 | if (expr.arguments) { |
| 45373 | for (var _i = 0, _a = expr.arguments; _i < _a.length; _i++) { |
| 45374 | var argument = _a[_i]; |
| 45375 | if (containsNarrowableReference(argument)) { |
| 45376 | return true; |
| 45377 | } |
| 45378 | } |
| 45379 | } |
| 45380 | if (expr.expression.kind === 206 /* SyntaxKind.PropertyAccessExpression */ && |
| 45381 | containsNarrowableReference(expr.expression.expression)) { |
| 45382 | return true; |
| 45383 | } |
| 45384 | return false; |
| 45385 | } |
| 45386 | function isNarrowingTypeofOperands(expr1, expr2) { |
| 45387 | return ts.isTypeOfExpression(expr1) && isNarrowableOperand(expr1.expression) && ts.isStringLiteralLike(expr2); |
| 45388 | } |
no test coverage detected