UNPKG

@aeolun/graphql-redis-subscriptions

Version:
24 lines (23 loc) 713 B
import { PubSubEngine } from 'graphql-subscriptions'; export declare class PubSubAsyncIterator<T> implements AsyncIterableIterator<T> { constructor(pubsub: PubSubEngine, eventNames: string | string[], options?: unknown); next(): Promise<IteratorResult<any, any>>; return(): Promise<{ value: unknown; done: true; }>; throw(error: any): Promise<never>; [Symbol.asyncIterator](): this; private pullQueue; private pushQueue; private eventsArray; private subscriptionIds; private listening; private pubsub; private options; private pushValue; private pullValue; private emptyQueue; private subscribeAll; private unsubscribeAll; }