(name: string, opts: { lines?: number; edge?: WireFlowEdge | null } = {})
| 56 | } |
| 57 | |
| 58 | function hop(name: string, opts: { lines?: number; edge?: WireFlowEdge | null } = {}): WireFlowHop { |
| 59 | const lines = opts.lines ?? 7; |
| 60 | return { |
| 61 | node: { |
| 62 | id: `method:${name}`, |
| 63 | kind: 'method', |
| 64 | name, |
| 65 | qualifiedName: name, |
| 66 | file: `src/${name}.ts`, |
| 67 | line: 10, |
| 68 | endLine: 40, |
| 69 | language: 'typescript', |
| 70 | test: false, |
| 71 | }, |
| 72 | edge: opts.edge === undefined ? edge() : opts.edge, |
| 73 | callRef: null, |
| 74 | source: |
| 75 | lines === 0 |
| 76 | ? null |
| 77 | : { |
| 78 | file: `src/${name}.ts`, |
| 79 | language: 'typescript', |
| 80 | from: 7, |
| 81 | to: 6 + lines, |
| 82 | lines: Array.from({ length: lines }, (_, i) => `line ${i}`), |
| 83 | drift: false, |
| 84 | }, |
| 85 | }; |
| 86 | } |
| 87 | |
| 88 | function flow( |
| 89 | id: string, |
no test coverage detected