UNPKG

@graphql-tools/utils

Version:

Common package containing utils and types for GraphQL tools

13 lines (12 loc) 391 B
export interface Observer<T> { next: (value: T) => void; error: (error: Error) => void; complete: () => void; } export interface Observable<T> { subscribe(observer: Observer<T>): { unsubscribe: () => void; }; } export type Callback = (value?: any) => any; export declare function observableToAsyncIterable<T>(observable: Observable<T>): AsyncIterableIterator<T>;