The file scope's unresolved calls within a value's lines — what a wrapped handler's arrow body leaves on the file node.
(cg: CodeGraph, node: Node, memo: Map<string, UnresolvedReference[]>)
| 1687 | |
| 1688 | /** The file scope's unresolved calls within a value's lines — what a wrapped handler's arrow body leaves on the file node. */ |
| 1689 | function fileScopeRefsWithin(cg: CodeGraph, node: Node, memo: Map<string, UnresolvedReference[]>): UnresolvedReference[] { |
| 1690 | let refs = memo.get(node.filePath); |
| 1691 | if (refs === undefined) { |
| 1692 | const file = cg.getNodesInFile(node.filePath).find((n) => n.kind === 'file'); |
| 1693 | try { |
| 1694 | refs = file ? cg.getUnresolvedReferencesFrom(file.id) : []; |
| 1695 | } catch { |
| 1696 | refs = []; |
| 1697 | } |
| 1698 | memo.set(node.filePath, refs); |
| 1699 | } |
| 1700 | return refs.filter((r) => r.line >= node.startLine && r.line <= node.endLine); |
| 1701 | } |
| 1702 | |
| 1703 | /** `push /capture`, `renders <Button>`, `via rn-event-channel`, `calls`. */ |
| 1704 | function siteText(edge: Edge, meta: Record<string, unknown>, target: Node): string { |
no test coverage detected