UNPKG

391 BTypeScriptView Raw
1export interface Observer<T> {
2 next: (value: T) => void;
3 error: (error: Error) => void;
4 complete: () => void;
5}
6export interface Observable<T> {
7 subscribe(observer: Observer<T>): {
8 unsubscribe: () => void;
9 };
10}
11export type Callback = (value?: any) => any;
12export declare function observableToAsyncIterable<T>(observable: Observable<T>): AsyncIterableIterator<T>;