提交 dd16944e 编写于 作者: S Shane Fitzpatrick 提交者: Justin Beckwith

Adding better 'responseType' and 'method' type definitions by using a string...

Adding better 'responseType' and 'method' type definitions by using a string literal union type of possible values (#1148)
上级 8e3b50c5
......@@ -22,7 +22,7 @@ export interface AxiosProxyConfig {
export interface AxiosRequestConfig {
url?: string;
method?: string;
method?: 'get' | 'delete' | 'head' | 'options' | 'post' | 'put' | 'patch';
baseURL?: string;
transformRequest?: AxiosTransformer | AxiosTransformer[];
transformResponse?: AxiosTransformer | AxiosTransformer[];
......@@ -34,7 +34,7 @@ export interface AxiosRequestConfig {
withCredentials?: boolean;
adapter?: AxiosAdapter;
auth?: AxiosBasicCredentials;
responseType?: string;
responseType?: 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream';
xsrfCookieName?: string;
xsrfHeaderName?: string;
onUploadProgress?: (progressEvent: any) => void;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册