| 7 | */ |
| 8 | |
| 9 | export interface AsyncChannel<T> { |
| 10 | push(value: T): void |
| 11 | close(): void |
| 12 | error(err: Error): void |
| 13 | [Symbol.asyncIterator](): AsyncIterableIterator<T> |
| 14 | } |
| 15 | |
| 16 | export function createChannel<T>(): AsyncChannel<T> { |
| 17 | const queue: T[] = [] |
no outgoing calls
no test coverage detected