File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11// TypeScript Version: 4.7
2+ type StringLiteralsOrString < Literals extends string > = Literals | ( string & { } ) ;
3+
24export type AxiosHeaderValue = AxiosHeaders | string | string [ ] | number | boolean | null ;
35
46interface RawAxiosHeaders {
@@ -302,7 +304,7 @@ export interface AxiosProgressEvent {
302304
303305type Milliseconds = number ;
304306
305- type AxiosAdapterName = 'fetch' | ' xhr' | 'http' | ( string & { } ) ;
307+ type AxiosAdapterName = StringLiteralsOrString < ' xhr' | 'http' | 'fetch' > ;
306308
307309type AxiosAdapterConfig = AxiosAdapter | AxiosAdapterName ;
308310
@@ -317,7 +319,7 @@ export type LookupAddress = string | LookupAddressEntry;
317319
318320export interface AxiosRequestConfig < D = any > {
319321 url ?: string ;
320- method ?: Method | string ;
322+ method ?: StringLiteralsOrString < Method > ;
321323 baseURL ?: string ;
322324 allowAbsoluteUrls ?: boolean ;
323325 transformRequest ?: AxiosRequestTransformer | AxiosRequestTransformer [ ] ;
@@ -332,7 +334,7 @@ export interface AxiosRequestConfig<D = any> {
332334 adapter ?: AxiosAdapterConfig | AxiosAdapterConfig [ ] ;
333335 auth ?: AxiosBasicCredentials ;
334336 responseType ?: ResponseType ;
335- responseEncoding ?: responseEncoding | string ;
337+ responseEncoding ?: StringLiteralsOrString < responseEncoding > ;
336338 xsrfCookieName ?: string ;
337339 xsrfHeaderName ?: string ;
338340 onUploadProgress ?: ( progressEvent : AxiosProgressEvent ) => void ;
You can’t perform that action at this time.
0 commit comments