(callPath: NodePath<t.CallExpression>)
| 55 | |
| 56 | program.traverse({ |
| 57 | CallExpression(callPath: NodePath<t.CallExpression>) { |
| 58 | const callee = callPath.node.callee; |
| 59 | |
| 60 | if (t.isIdentifier(callee) && importNames.has(callee.name)) { |
| 61 | result.push(callPath.node); |
| 62 | } else if ( |
| 63 | t.isMemberExpression(callee) && |
| 64 | t.isIdentifier(callee.object) && |
| 65 | importNames.get(callee.object.name) === "namespace" && |
| 66 | t.isIdentifier(callee.property) && |
| 67 | callee.property.name === functionName |
| 68 | ) { |
| 69 | result.push(callPath.node); |
| 70 | } |
| 71 | }, |
| 72 | }); |
| 73 | } |