(
path: NodePath<FunctionClass | Identifier>,
)
| 78 | } |
| 79 | |
| 80 | private findParentFunctionPath( |
| 81 | path: NodePath<FunctionClass | Identifier>, |
| 82 | ): Nullable<NodePath<FunctionClass | Program>> { |
| 83 | let curPath = path.parentPath; |
| 84 | while (curPath) { |
| 85 | if ( |
| 86 | isFunctionType(curPath.node.type) || |
| 87 | curPath.node.type === 'Program' |
| 88 | ) { |
| 89 | return curPath as NodePath<FunctionClass | Program>; |
| 90 | } |
| 91 | if (curPath.parentPath == null) { |
| 92 | break; |
| 93 | } |
| 94 | curPath = curPath.parentPath; |
| 95 | } |
| 96 | return null; |
| 97 | } |
| 98 | |
| 99 | private findParentFunctionClosureScope( |
| 100 | locToClosureScopeMap: Map<string, ClosureScope>, |
no test coverage detected