pronoun
CDCloudflare Developers
•Created by pronoun on 6/14/2024 in #workers-help
@cloudflare/worker-types ReadableStream incompatible with TypeScript default
it seems like vscode doesn't detect this (the DOM declarations are available) but for me running
tsc -p tsconfig.node.json
is good enough and I still get intellisense for the config so I guess I didn't notice9 replies
CDCloudflare Developers
•Created by pronoun on 6/14/2024 in #workers-help
@cloudflare/worker-types ReadableStream incompatible with TypeScript default
but I just set
tsconfig.json
to only include files in my src/ directory and had a separate tsconfig.node.json
including only config files running in node9 replies
CDCloudflare Developers
•Created by pronoun on 6/14/2024 in #workers-help
@cloudflare/worker-types ReadableStream incompatible with TypeScript default
huh, I just checked and apparently my setup doesn't do it properly 😅
9 replies
CDCloudflare Developers
•Created by pronoun on 6/14/2024 in #workers-help
@cloudflare/worker-types ReadableStream incompatible with TypeScript default
Oh I should’ve done that — thanks!
9 replies
CDCloudflare Developers
•Created by pronoun on 6/14/2024 in #workers-help
@cloudflare/worker-types ReadableStream incompatible with TypeScript default
For future reference if anyone else ran into the same issue, it seems like it was because of my
vitest.config.ts
— in particular this import (included in the starter template) apparently introduced an additional global type declaration for fetch()
:
so I was able to solve the issue with a separate tsconfig for files being run in Node (like my Vitest config)9 replies