Iterates over all statements at the top level or in module declarations. Returns the first truthy result.
(sourceFileLike, action)
| 136555 | } |
| 136556 | /** Iterates over all statements at the top level or in module declarations. Returns the first truthy result. */ |
| 136557 | function forEachPossibleImportOrExportStatement(sourceFileLike, action) { |
| 136558 | return ts.forEach(sourceFileLike.kind === 305 /* SyntaxKind.SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, function (statement) { |
| 136559 | return action(statement) || (isAmbientModuleDeclaration(statement) && ts.forEach(statement.body && statement.body.statements, action)); |
| 136560 | }); |
| 136561 | } |
| 136562 | /** Calls `action` for each import, re-export, or require() in a file. */ |
| 136563 | function forEachImport(sourceFile, action) { |
| 136564 | if (sourceFile.externalModuleIndicator || sourceFile.imports !== undefined) { |
no test coverage detected