跳到主要内容

HttpResponseType

type HttpResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect";

Defined in: packages/rxdb-adapter-http/src/http.interface.ts:267

Response.type 的取值集合。

Remarks​

与 DOM 的 ResponseType 逐字同义,但自己声明一份:DOM 的那个是全局名,只在 lib 含 dom 时存在。写进公开接口后,纯 Node 消费方(lib: ["es2025"])编我们的 .d.ts 会以 TS2304: Cannot find name 'ResponseType' 失败——而本仓库的 base tsconfig 带着 dom,这个红我们自己永远看不见。守卫在 __tests__/public-types.spec.ts。

不从 undici-types 引:那是 Node 侧的模块导出,浏览器消费方没有它。