question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incomplete TypeScript typings in @graphiql/toolkit@0.3.0

See original GitHub issue

In version 0.3.0, @graphiql/toolkit dropped the dependency on subscriptions-transport-ws, making it a devDependency only. The problem is that @graphiql/toolkit/dist/create-fetcher/types.d.ts still performs a type import from subscriptions-transport-ws. This means that any TypeScript project using @graphiql/toolkit (or graphiql) but not subscriptions-transport-ws will now get a TypeScript error:

node_modules/@graphiql/toolkit/dist/create-fetcher/types.d.ts:3:41 - error TS2307: Cannot find module ‘subscriptions-transport-ws’ or its corresponding type declarations.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
DanielSWolfcommented, Oct 29, 2021

Thank you, @acao! It took us a few hours to verify the fix due to a problem with our local NPM proxy, but now everything is working fine again.

1reaction
acaocommented, Oct 29, 2021

@DanielSWolf thanks for reporting that! i have a follow up PR that finalizes this, and also re-introduced a step to github actions that validates the imported build in a simple webpack project

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is the best way to deal with Typescript incomplete type ...
Well, the best way to handle that is go to the incomplete type definition, fill add the missing things and submit a PR....
Read more >
Missing or incomplete TypeScript type definitions #770 - GitHub
Bug details Describe the bug This SDK is missing type definitions. ... Missing or incomplete TypeScript type definitions #770.
Read more >
Typescript Typings: The Complete Guide: @types Compiler ...
Typescript Typings - The Complete Guide To Type Definitions: @types, Compiler Opt-In Types: When To Use Each and Why?
Read more >
TypeScript: JavaScript With Syntax For Types.
TypeScript extends JavaScript by adding types to the language. TypeScript speeds up your development experience by catching errors and providing fixes ...
Read more >
TypeScript: Adding Custom Type Definitions for Existing ...
Extending An Incomplete Third-Party Library Definition. An even more common scenario is finding third-party libraries with existing definitions ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found