| 7496 | importsValues(module) |
| 7497 | |
| 7498 | export const bindingOfFunction = ( |
| 7499 | node: Node, |
| 7500 | module: SourceModule |
| 7501 | ): Binding | undefined => { |
| 7502 | if (node.parent && namedFunctionOf(node.parent, module) === node) |
| 7503 | node = node.parent |
| 7504 | const id = |
| 7505 | node.type === "FunctionDeclaration" || node.type === "ClassDeclaration" ? |
| 7506 | node.id |
| 7507 | : node.parent?.type === "VariableDeclarator" && node.parent.init === node ? |
| 7508 | node.parent.id |
| 7509 | : undefined |
| 7510 | return id ? module.scopes.bindingsById.get(id) : undefined |
| 7511 | } |
| 7512 | |
| 7513 | export const enclosingFunctionOf = (node: Node): FunctionNode | undefined => { |
| 7514 | for (let parent = node.parent; parent; parent = parent.parent) |