Definitelytyped: @types/graphql AsyncIterator AsyncIterable

Created on 2 Aug 2017  路  4Comments  路  Source: DefinitelyTyped/DefinitelyTyped

  • [x] I tried using the @types/graphql package and had problems.
  • [x] I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript
  • [ ] I have a question that is inappropriate for StackOverflow. (Please ask any appropriate questions there).
  • [x] [Mention](https://github.com/blog/821-mention-somebody-they-re-notified) the authors (see Definitions by: in index.d.ts) so they can respond.

    • Authors: @TonyPythoneer @calebmer @intellix @firede @kepennar

  1. node_modules/@types/graphql/subscription/subscribe.d.ts(17,4): error TS2314: Generic type AsyncIterator' requires 2 type argument(s).
  2. node_modules/@types/graphql/subscription/subscribe.d.ts(29,4): error TS2304: Cannot find name AsyncIterable'.

Most helpful comment

@ksaifullah Thanks, it works for me. By adding "esnext" in tsconfig.json:

"lib": [
  "es2017",
  "dom",
  "esnext"
]

All 4 comments

@ksaifullah Thanks, it works for me. By adding "esnext" in tsconfig.json:

"lib": [
  "es2017",
  "dom",
  "esnext"
]

use esnext

can we close this?

Was this page helpful?
0 / 5 - 0 ratings