(expr)
| 71194 | return getTypeWithFacts(mapType(type, narrowUnionMemberByTypeof(impliedType)), switchFacts); |
| 71195 | } |
| 71196 | function isMatchingConstructorReference(expr) { |
| 71197 | return (ts.isPropertyAccessExpression(expr) && ts.idText(expr.name) === "constructor" || |
| 71198 | ts.isElementAccessExpression(expr) && ts.isStringLiteralLike(expr.argumentExpression) && expr.argumentExpression.text === "constructor") && |
| 71199 | isMatchingReference(reference, expr.expression); |
| 71200 | } |
| 71201 | function narrowTypeByConstructor(type, operator, identifier, assumeTrue) { |
| 71202 | // Do not narrow when checking inequality. |
| 71203 | if (assumeTrue ? (operator !== 34 /* SyntaxKind.EqualsEqualsToken */ && operator !== 36 /* SyntaxKind.EqualsEqualsEqualsToken */) : (operator !== 35 /* SyntaxKind.ExclamationEqualsToken */ && operator !== 37 /* SyntaxKind.ExclamationEqualsEqualsToken */)) { |
no test coverage detected
searching dependent graphs…