UNPKG

alinea

Version:

[![npm](https://img.shields.io/npm/v/alinea.svg)](https://npmjs.org/package/alinea) [![install size](https://packagephobia.com/badge?p=alinea)](https://packagephobia.com/result?p=alinea)

11 lines (10 loc) 285 B
export interface Emitter<T> extends AsyncIterable<T> { emit(value: T): void; throw(error: any): void; cancel(): void; return(): void; } export declare namespace Emitter { const CANCELLED = "EMIT_CANCELLED"; } export declare function createEmitter<T>(): Emitter<T>;