mirror of
https://github.com/tenrok/axios.git
synced 2026-06-11 18:02:32 +03:00
feat(types): improved fetchOptions interface (#6867)
* feat(types): added js native interface for fetchOptions * fix(types): adjusted to fetchOptions accept any value as the original version --------- Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
+1
-1
@@ -418,7 +418,7 @@ declare namespace axios {
|
||||
lookup?: ((hostname: string, options: object, cb: (err: Error | null, address: LookupAddress | LookupAddress[], family?: AddressFamily) => void) => void) |
|
||||
((hostname: string, options: object) => Promise<[address: LookupAddressEntry | LookupAddressEntry[], family?: AddressFamily] | LookupAddress>);
|
||||
withXSRFToken?: boolean | ((config: InternalAxiosRequestConfig) => boolean | undefined);
|
||||
fetchOptions?: Record<string, any>;
|
||||
fetchOptions?: Omit<RequestInit, 'body' | 'headers' | 'method' | 'signal'> | Record<string, any>;
|
||||
}
|
||||
|
||||
// Alias
|
||||
|
||||
Vendored
+1
-1
@@ -361,7 +361,7 @@ export interface AxiosRequestConfig<D = any> {
|
||||
lookup?: ((hostname: string, options: object, cb: (err: Error | null, address: LookupAddress | LookupAddress[], family?: AddressFamily) => void) => void) |
|
||||
((hostname: string, options: object) => Promise<[address: LookupAddressEntry | LookupAddressEntry[], family?: AddressFamily] | LookupAddress>);
|
||||
withXSRFToken?: boolean | ((config: InternalAxiosRequestConfig) => boolean | undefined);
|
||||
fetchOptions?: Record<string, any>;
|
||||
fetchOptions?: Omit<RequestInit, 'body' | 'headers' | 'method' | 'signal'> | Record<string, any>;
|
||||
}
|
||||
|
||||
// Alias
|
||||
|
||||
Reference in New Issue
Block a user