(body: Node)
| 43 | |
| 44 | /** Returns true if the body includes an import declaration. */ |
| 45 | export function hasImportDeclaration(body: Node): boolean { |
| 46 | let has = false; |
| 47 | |
| 48 | simple(body, { |
| 49 | ImportDeclaration() { |
| 50 | has = true; |
| 51 | } |
| 52 | }); |
| 53 | |
| 54 | return has; |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * Finds all imports (both static and dynamic, local and global) with |
no outgoing calls
no test coverage detected