fix: 修复 fetch.ts preconnect 重复标识符类型错误
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
06be8bc88c
commit
22fd08537a
|
|
@ -43,8 +43,13 @@ const VERSION = getVersion()
|
||||||
* 3. 注入 Authorization 和 CoStrict 特有 headers
|
* 3. 注入 Authorization 和 CoStrict 特有 headers
|
||||||
* 4. 反应性 401 错误恢复(自动重试一次)
|
* 4. 反应性 401 错误恢复(自动重试一次)
|
||||||
*/
|
*/
|
||||||
|
type CoStrictFetchFn = {
|
||||||
|
(input: RequestInfo | URL, init?: RequestInit): Promise<Response>
|
||||||
|
preconnect?: (url: string | URL) => void
|
||||||
|
}
|
||||||
|
|
||||||
export function createCoStrictFetch() {
|
export function createCoStrictFetch() {
|
||||||
const costrictFetch = async (
|
const costrictFetch: CoStrictFetchFn = async (
|
||||||
input: RequestInfo | URL,
|
input: RequestInfo | URL,
|
||||||
init?: RequestInit,
|
init?: RequestInit,
|
||||||
) => {
|
) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user