UNPKG

758 BTypeScriptView Raw
1import * as React from 'react';
2import type { UploadProps as RcUploadProps } from 'rc-upload';
3import RcUpload from 'rc-upload';
4import type { RcFile, UploadFile, UploadProps } from './interface';
5export declare const LIST_IGNORE: string;
6export type { UploadProps };
7export interface UploadRef<T = any> {
8 onBatchStart: RcUploadProps['onBatchStart'];
9 onSuccess: (response: any, file: RcFile, xhr: any) => void;
10 onProgress: (e: {
11 percent: number;
12 }, file: RcFile) => void;
13 onError: (error: Error, response: any, file: RcFile) => void;
14 fileList: UploadFile<T>[];
15 upload: RcUpload | null;
16}
17declare const Upload: React.ForwardRefExoticComponent<UploadProps<any> & React.RefAttributes<UploadRef<any>>>;
18export default Upload;