Minimal Node stub — the traversal code only reads id/kind/name.
(id: string, kind: Node['kind'] = 'function')
| 499 | |
| 500 | /** Minimal Node stub — the traversal code only reads id/kind/name. */ |
| 501 | function tNode(id: string, kind: Node['kind'] = 'function'): Node { |
| 502 | return { |
| 503 | id, |
| 504 | kind, |
| 505 | name: id, |
| 506 | qualifiedName: id, |
| 507 | filePath: `src/${id}.ts`, |
| 508 | language: 'typescript', |
| 509 | startLine: 1, |
| 510 | endLine: 10, |
| 511 | startColumn: 0, |
| 512 | endColumn: 0, |
| 513 | } as unknown as Node; |
| 514 | } |
| 515 | |
| 516 | /** Build a GraphTraverser over a fixed node/edge set, honoring the `kinds` filter. */ |
| 517 | function tGraph(nodes: Node[], edges: Edge[]): GraphTraverser { |