Closed seawatts closed 1 year ago
Can you try adding @types/node
or dom
in your taconfig.json types?
Do you have an example of the tsconfig.json file that includes those? I can't seem to get it working.
Example tsconfig:
{
"compilerOptions": {
"lib": ["dom"],
// ...
That worked! Thank you so much. 🙂
When generating a genql client with the CLI
The file
genql/runtime/createClient.ts
creates a type calledHeaders
When running
tsc
on this file, I get the following error:It looks like the code is being generated here: https://github.com/remorses/genql/blob/8c02b9c01ce6d64b900940344b248b18f3d2cc8c/cli/src/runtime/createClient.ts#L9
I believe the fix would be to create a new type for
HeadersInit
. I'm not sure what the type should be which is why I haven't created a PR.Let me know how I can help here.