Files
hackathon-v-escape-4ff8b5a6…/frontend/node_modules/fetch-retry/index.d.ts
marianesaldana 80dbd947e5 Initial commit
2026-05-23 08:59:34 -06:00

27 lines
713 B
TypeScript

/// <reference lib="dom" />
declare module 'fetch-retry' {
const _fetch: typeof fetch;
type RequestDelayFunction = ((
attempt: number,
error: Error | null,
response: Response | null
) => number);
type RequestRetryOnFunction = ((
attempt: number,
error: Error | null,
response: Response | null
) => boolean | Promise<boolean>);
interface IRequestInitWithRetry extends RequestInit {
retries?: number;
retryDelay?: number | RequestDelayFunction;
retryOn?: number[] | RequestRetryOnFunction;
}
function fetchBuilder(fetch: typeof _fetch, defaults?: object): ((input: RequestInfo, init?: IRequestInitWithRetry) => Promise<Response>);
export = fetchBuilder;
}