()
| 136229 | handleDirectImports(exportingModuleSymbol); |
| 136230 | return { directImports: directImports, indirectUsers: getIndirectUsers() }; |
| 136231 | function getIndirectUsers() { |
| 136232 | if (isAvailableThroughGlobal) { |
| 136233 | // It has `export as namespace`, so anything could potentially use it. |
| 136234 | return sourceFiles; |
| 136235 | } |
| 136236 | // Module augmentations may use this module's exports without importing it. |
| 136237 | if (exportingModuleSymbol.declarations) { |
| 136238 | for (var _i = 0, _a = exportingModuleSymbol.declarations; _i < _a.length; _i++) { |
| 136239 | var decl = _a[_i]; |
| 136240 | if (ts.isExternalModuleAugmentation(decl) && sourceFilesSet.has(decl.getSourceFile().fileName)) { |
| 136241 | addIndirectUser(decl); |
| 136242 | } |
| 136243 | } |
| 136244 | } |
| 136245 | // This may return duplicates (if there are multiple module declarations in a single source file, all importing the same thing as a namespace), but `State.markSearchedSymbol` will handle that. |
| 136246 | return indirectUserDeclarations.map(ts.getSourceFileOfNode); |
| 136247 | } |
| 136248 | function handleDirectImports(exportingModuleSymbol) { |
| 136249 | var theseDirectImports = getDirectImports(exportingModuleSymbol); |
| 136250 | if (theseDirectImports) { |
no test coverage detected