(name: string, file: string)
| 233 | // symbol of its own (#1669), so a navigation it makes is ITS edge — the same |
| 234 | // shape a `useCallback` handler has — and the screen reaches it by calling it. |
| 235 | const symIn = (name: string, file: string): Node => { |
| 236 | const n = cg.getNodesByName(name).find((n) => n.kind !== 'route' && n.kind !== 'file' && n.kind !== 'import' && n.filePath.endsWith(file)); |
| 237 | if (!n) throw new Error(`no symbol ${name} in ${file}`); |
| 238 | return n; |
| 239 | }; |
| 240 | const navs = (from: Node) => cg.getOutgoingEdges(from.id).filter((e) => e.kind === 'navigates'); |
| 241 | const hrefs = (from: Node) => |
| 242 | navs(from) |
no test coverage detected