1 | type UndiciHeadersInit = string[][] | Record<string, string | readonly string[]> | Headers;
|
2 | type UndiciBodyInit = ArrayBuffer | AsyncIterable<Uint8Array> | Blob | FormData | Iterable<Uint8Array> | ArrayBufferView | URLSearchParams | null | string;
|
3 | type UndiciRequestRedirect = 'error' | 'follow' | 'manual';
|
4 | type UndiciRequestCredentials = 'omit' | 'include' | 'same-origin';
|
5 | type UndiciReferrerPolicy = '' | 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
|
6 | type UndiciRequestMode = 'cors' | 'navigate' | 'no-cors' | 'same-origin';
|
7 | type UndiciRequestInit = {
|
8 | method?: string;
|
9 | keepalive?: boolean;
|
10 | headers?: UndiciHeadersInit;
|
11 | body?: UndiciBodyInit;
|
12 | redirect?: UndiciRequestRedirect;
|
13 | integrity?: string;
|
14 | signal?: AbortSignal | undefined;
|
15 | credentials?: UndiciRequestCredentials;
|
16 | mode?: UndiciRequestMode;
|
17 | referrer?: string;
|
18 | referrerPolicy?: UndiciReferrerPolicy;
|
19 | window?: undefined;
|
20 | dispatcher?: unknown;
|
21 | duplex?: unknown;
|
22 | };
|
23 | type CombinedRequestInit = globalThis.RequestInit & UndiciRequestInit;
|
24 | export type RequestInitRegistry = {
|
25 | [K in keyof CombinedRequestInit]-?: true;
|
26 | };
|
27 | export type KyRequest<T = unknown> = {
|
28 | json: <J = T>() => Promise<J>;
|
29 | } & Request;
|
30 | export {};
|