(id: number, file = 'src/a.ts', start = 1, end = 10)
| 4 | import type { GraphData, GraphNode } from './types'; |
| 5 | |
| 6 | const node = (id: number, file = 'src/a.ts', start = 1, end = 10): GraphNode => ({ id, name: `n${id}`, qualified_name: `p.n${id}`, file_path: file, |
| 7 | label: 'Function', start_line: start, end_line: end, x: id, y: 0, z: 0, color: '#abcabc', size: 3 }); |
| 8 | const row = (value: GraphNode, prefix = '') => Object.fromEntries(Object.entries({ id: value.id, label: value.label, name: value.name, qn: value.qualified_name, |
| 9 | file: value.file_path, start_line: value.start_line, end_line: value.end_line }).map(([key, value]) => [prefix + key, String(value ?? '')])); |
| 10 | const page = (records: Record<string, string>[], extra: Partial<QueryGraphResult> = {}): QueryGraphResult => { |
no outgoing calls
no test coverage detected