Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

Commit

Permalink
added async iterator type stubs, see apollographql/graphql-subscripti…
Browse files Browse the repository at this point in the history
…ons#83 for more info
  • Loading branch information
lukasbuenger committed Aug 15, 2017
1 parent 01f4f15 commit d8dcf67
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/types/apollo.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
interface AsyncIterator<T> {
next(value?: any): Promise<IteratorResult<T>>
return?(value?: any): Promise<IteratorResult<T>>
throw?(e?: any): Promise<IteratorResult<T>>
}

interface AsyncIterable<T> {
[key: string]: AsyncIterator<T>
}

0 comments on commit d8dcf67

Please sign in to comment.