diff --git a/types/react-request/index.d.ts b/types/react-request/index.d.ts index ed13bb1337..d54c067215 100644 --- a/types/react-request/index.d.ts +++ b/types/react-request/index.d.ts @@ -31,10 +31,12 @@ export interface FetchRequestProps extends RequestInit { url: string; } +export type ResponseType = 'arrayBuffer' | 'blob' | 'formData' | 'json' | 'text'; + export interface FetchProps extends FetchRequestProps { afterFetch?: (args: FetchResponse) => void; transformData?: (data: any) => T; - responseType?: string; + responseType?: ResponseType; children?: (renderProps: RenderProps) => React.ReactNode; }