(sites: Record<string, ProgramSite[]>, replies: string[] = [], into: Record<string, string> = {})
| 39 | } |
| 40 | |
| 41 | function program(sites: Record<string, ProgramSite[]>, replies: string[] = [], into: Record<string, string> = {}) { |
| 42 | nextLine = 1; |
| 43 | const input: ProgramInput = { |
| 44 | sites: new Map(Object.entries(sites)), |
| 45 | root: 'root', |
| 46 | node: (id) => ({ id, kind: 'function', name: id, qualifiedName: id, file: 'a.ts', line: 1, endLine: 2, language: 'typescript', test: false }), |
| 47 | step: (id) => ({ reply: replies.includes(id), into: into[id] ?? null }), |
| 48 | }; |
| 49 | return buildProgram(input); |
| 50 | } |
| 51 | |
| 52 | /** The shape of a block, one line per item, indented — what a reader would see. */ |
| 53 | function shape(block: WireBlock, indent = ''): string[] { |
no test coverage detected