(ast)
| 94 | * @returns {number} - count |
| 95 | */ |
| 96 | const getCountImportedFunc = (ast) => { |
| 97 | let count = 0; |
| 98 | |
| 99 | t.traverse(ast, { |
| 100 | ModuleImport({ node }) { |
| 101 | if (t.isFuncImportDescr(node.descr)) { |
| 102 | count++; |
| 103 | } |
| 104 | } |
| 105 | }); |
| 106 | |
| 107 | return count; |
| 108 | }; |
| 109 | |
| 110 | /** |
| 111 | * Get next type index |