apollographql / apollographql/graphql-subscriptions
pubSub.asyncIterator() return type
- Dominant language
- TypeScript
- Stars
- 1.6k
- Forks
- 129
- PR merge metrics
- No merged PRs in 30d
Description
Shouldn't the return type be `AsyncIterableIterator` ([TS lib file](https://github.com/Microsoft/TypeScript/blob/master/lib/lib.es2018.asynciterable.d.ts#L42)) instead of `AsyncIterator`? I see it has the `Symbol.asyncIterator` property [here](https://github.com/apollographql/graphql-subscriptions/blob/master/src/event-emitter-to-async-iterator.ts#L71)
Contributor guide
Research direction
Start with src/event-emitter-to-async-iterator.ts, especially the implementation around the Symbol.asyncIterator property, and inspect the declared return type of pubSub.asyncIterator(). Compare it with TypeScript's AsyncIterableIterator definition in lib.es2018.asynciterable.d.ts. Done means the public return type accurately reflects the implemented iterator.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100