Improve typing of `UploadFile` interface

UploadFile interface made generic type so that a user can define a strongly typed response object if needed
pull/19342/head
Sagar Jain 5 years ago committed by 偏右
parent 6b74a1e944
commit 25927c6a41

@ -24,7 +24,7 @@ export interface RcCustomRequestOptions {
headers: object;
}
export interface UploadFile {
export interface UploadFile<T = any> {
uid: string;
size: number;
name: string;
@ -36,7 +36,7 @@ export interface UploadFile {
percent?: number;
thumbUrl?: string;
originFileObj?: File | Blob;
response?: any;
response?: T;
error?: any;
linkProps?: any;
type: string;

Loading…
Cancel
Save