diff --git a/types/react-request/index.d.ts b/types/react-request/index.d.ts index a161ff9339..d54c067215 100644 --- a/types/react-request/index.d.ts +++ b/types/react-request/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Danny Cochran // Angus Fretwell // Jonathan Ly +// Alberto Juan // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.9 @@ -30,9 +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?: ResponseType; children?: (renderProps: RenderProps) => React.ReactNode; }