mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
[@types/react-request] Added ResponseType
This commit is contained in:
parent
2782401d88
commit
00d1a2dd48
4
types/react-request/index.d.ts
vendored
4
types/react-request/index.d.ts
vendored
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user