True if symbol is a type or a module containing at least one type.
(symbol, checker, seenModules)
| 135462 | ; |
| 135463 | /** True if symbol is a type or a module containing at least one type. */ |
| 135464 | function symbolCanBeReferencedAtTypeLocation(symbol, checker, seenModules) { |
| 135465 | if (seenModules === void 0) { seenModules = new ts.Map(); } |
| 135466 | // Since an alias can be merged with a local declaration, we need to test both the alias and its target. |
| 135467 | // This code used to just test the result of `skipAlias`, but that would ignore any locally introduced meanings. |
| 135468 | return nonAliasCanBeReferencedAtTypeLocation(symbol) || nonAliasCanBeReferencedAtTypeLocation(ts.skipAlias(symbol.exportSymbol || symbol, checker)); |
| 135469 | function nonAliasCanBeReferencedAtTypeLocation(symbol) { |
| 135470 | return !!(symbol.flags & 788968 /* SymbolFlags.Type */) || checker.isUnknownSymbol(symbol) || |
| 135471 | !!(symbol.flags & 1536 /* SymbolFlags.Module */) && ts.addToSeen(seenModules, ts.getSymbolId(symbol)) && |
| 135472 | checker.getExportsOfModule(symbol).some(function (e) { return symbolCanBeReferencedAtTypeLocation(e, checker, seenModules); }); |
| 135473 | } |
| 135474 | } |
| 135475 | function isDeprecated(symbol, checker) { |
| 135476 | var declarations = ts.skipAlias(symbol, checker).declarations; |
| 135477 | return !!ts.length(declarations) && ts.every(declarations, ts.isDeprecatedDeclaration); |
no test coverage detected