#workers types issue with Response

3 messages · Page 1 of 1 (latest)

analog shuttle
#

trying to make a simple websocket server with durable objects, passing the websocket as a ResponseInit parameter was causing issues, so I imported the types for DurableObject, Request, and Response from '@cloudflare/workers-types/experimental', that makes the typescript error go away, but when I try to run or deploy I get the following error:

No matching export in "node_modules/@cloudflare/workers-types/experimental/index.ts" for import "Response",

but the file clearly exports a Response class, any ideas?

shut thorn
analog shuttle
#

@shut thorn the first, just importing them as types gives a separate error since im using Response as a constructor