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.
any
dispatcher
lib: 'dom'
1 parent 27fa612 commit 24d45b4Copy full SHA for 24d45b4
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