(items: T[])
| 11 | import type { WorkspaceExecEvent } from "./shell.js"; |
| 12 | |
| 13 | function streamOf<T>(items: T[]): ReadableStream<T> { |
| 14 | return new ReadableStream<T>({ |
| 15 | start(controller) { |
| 16 | for (const item of items) controller.enqueue(item); |
| 17 | controller.close(); |
| 18 | }, |
| 19 | }); |
| 20 | } |
| 21 | |
| 22 | async function collect<T>(stream: ReadableStream<T>): Promise<T[]> { |
| 23 | const out: T[] = []; |
no outgoing calls
no test coverage detected