(fn: () => void)
| 70 | // (a plain `let` gets flow-narrowed to a literal and trips lint). |
| 71 | const state = { settled: false } |
| 72 | const settle = (fn: () => void): void => { |
| 73 | if (state.settled) return |
| 74 | state.settled = true |
| 75 | clearTimeout(timer) |
| 76 | fn() |
| 77 | } |
| 78 | const diagnostics = (): string => |
| 79 | [stdout, stderr] |
| 80 | .map((s) => s.trim()) |