(typeChecker, node, typeIdx)
| 131116 | return decl && tokenFromDeclarationMapping.get(decl.kind); |
| 131117 | } |
| 131118 | function reclassifyByType(typeChecker, node, typeIdx) { |
| 131119 | // type based classifications |
| 131120 | if (typeIdx === 7 /* TokenType.variable */ || typeIdx === 9 /* TokenType.property */ || typeIdx === 6 /* TokenType.parameter */) { |
| 131121 | var type_1 = typeChecker.getTypeAtLocation(node); |
| 131122 | if (type_1) { |
| 131123 | var test = function (condition) { |
| 131124 | return condition(type_1) || type_1.isUnion() && type_1.types.some(condition); |
| 131125 | }; |
| 131126 | if (typeIdx !== 6 /* TokenType.parameter */ && test(function (t) { return t.getConstructSignatures().length > 0; })) { |
| 131127 | return 0 /* TokenType.class */; |
| 131128 | } |
| 131129 | if (test(function (t) { return t.getCallSignatures().length > 0; }) && !test(function (t) { return t.getProperties().length > 0; }) || isExpressionInCallExpression(node)) { |
| 131130 | return typeIdx === 9 /* TokenType.property */ ? 11 /* TokenType.member */ : 10 /* TokenType.function */; |
| 131131 | } |
| 131132 | } |
| 131133 | } |
| 131134 | return typeIdx; |
| 131135 | } |
| 131136 | function isLocalDeclaration(decl, sourceFile) { |
| 131137 | if (ts.isBindingElement(decl)) { |
| 131138 | decl = getDeclarationForBindingElement(decl); |
no test coverage detected
searching dependent graphs…