[@types/react-request] Added ResponseType

This commit is contained in:
Alberto Juan 2019-04-09 14:53:15 +02:00
parent 2782401d88
commit 00d1a2dd48

View File

@ -31,10 +31,12 @@ export interface FetchRequestProps extends RequestInit {
url: string;
}
export type ResponseType = 'arrayBuffer' | 'blob' | 'formData' | 'json' | 'text';
export interface FetchProps<T = any> extends FetchRequestProps {
afterFetch?: (args: FetchResponse<T>) => void;
transformData?: (data: any) => T;
responseType?: string;
responseType?: ResponseType;
children?: (renderProps: RenderProps<T>) => React.ReactNode;
}