We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d711bdd + 24d45b4 commit 2e0923fCopy full SHA for 2e0923f
lib/http-proxy/index.ts
@@ -101,7 +101,11 @@ export interface ServerOptions {
101
fetch?: boolean | FetchOptions;
102
}
103
104
-export type Dispatcher = RequestInit["dispatcher"];
+// use `any` when `lib: "dom"` is included in tsconfig.json,
105
+// as dispatcher property does not exist in RequestInit in that case
106
+export type Dispatcher = (typeof globalThis extends { onmessage: any }
107
+ ? any
108
+ : RequestInit)["dispatcher"];
109
110
export interface FetchOptions {
111
/** Allow custom dispatcher */
0 commit comments