Remove/ignore lib.dom.d.ts

I've included the CF type definitions and have NOT explicitely included the DOM lib, but some other lib must be including it and subsequently the DOM types overrides (like Response.webSocket) are hidden and these references are showing up as errors.
src/email/mailbox-api.ts:33:25 - error TS2339: Property 'webSocket' does not exist on type 'Response'.

33 webSocket: response.webSocket,
~~~~~~~~~
src/email/mailbox-api.ts:33:25 - error TS2339: Property 'webSocket' does not exist on type 'Response'.

33 webSocket: response.webSocket,
~~~~~~~~~
My tsconfig looks like this:
"compilerOptions": {
"noEmit": true,
"outDir": "./dist",
"jsx": "react-jsx",
"jsxImportSource": "hono/jsx",
"lib": [
"ESNext",
],
"types": [
// NOTE: Must not add "DOM" to lib property.
"@cloudflare/workers-types/2023-07-01",
"@cloudflare/vitest-pool-workers",
"hono",
],

// TODO(burdon): Standardize with dxos/edge.
"module": "ESNext",
"moduleResolution": "Bundler",
"target": "ESNext"
},
"compilerOptions": {
"noEmit": true,
"outDir": "./dist",
"jsx": "react-jsx",
"jsxImportSource": "hono/jsx",
"lib": [
"ESNext",
],
"types": [
// NOTE: Must not add "DOM" to lib property.
"@cloudflare/workers-types/2023-07-01",
"@cloudflare/vitest-pool-workers",
"hono",
],

// TODO(burdon): Standardize with dxos/edge.
"module": "ESNext",
"moduleResolution": "Bundler",
"target": "ESNext"
},
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server