pubsub-async-iterator.d.ts 652 B

1234567891011121314151617181920
  1. import { $$asyncIterator } from 'iterall';
  2. import { PubSubEngine } from './pubsub-engine';
  3. export declare class PubSubAsyncIterator<T> implements AsyncIterator<T> {
  4. private pullQueue;
  5. private pushQueue;
  6. private eventsArray;
  7. private allSubscribed;
  8. private running;
  9. private pubsub;
  10. constructor(pubsub: PubSubEngine, eventNames: string | string[]);
  11. next(): Promise<IteratorResult<T>>;
  12. return(): Promise<IteratorResult<T>>;
  13. throw(error: any): Promise<never>;
  14. [$$asyncIterator](): this;
  15. private pushValue;
  16. private pullValue;
  17. private emptyQueue;
  18. private subscribeAll;
  19. private unsubscribeAll;
  20. }