ndthanhdev
ndthanhdev

Reputation: 169

Missing node module while using graphql in TypeScript project

I tried using the @types/graphql package with TypeScript Node Starter and had problems

node_modules//subscription/subscribe.d.ts(17,4): error TS2314: Generic type AsyncIterator<T, E>' requires 2 type argument(s).
node_modules//subscription/subscribe.d.ts(29,4): error TS2304: Cannot find name AsyncIterable'.

Upvotes: 0

Views: 223

Answers (1)

Adrian Leonhard
Adrian Leonhard

Reputation: 7360

Sometimes typings have errors, possibly due to newer TS versions catching more errors. Generally you still get sensible type data from them. To ignore errors in typings, you can add "skipLibCheck": true to your tsconfig.json.

Upvotes: 1

Related Questions