Skip to content

Commit 2ee8951

Browse files
committed
chore: Fix ts definition
1 parent 975c20a commit 2ee8951

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/AjaxUploader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class AjaxUploader extends Component<UploadProps> {
112112
.then(processedFile => {
113113
const processedFileType = Object.prototype.toString.call(processedFile);
114114
if (processedFileType === '[object File]' || processedFileType === '[object Blob]') {
115-
this.post(processedFile);
115+
this.post(processedFile as RcFile);
116116
return;
117117
}
118118
this.post(file);

src/interface.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ export interface UploadProps
2020
onError?: (error: Error, ret: object, file: RcFile) => void;
2121
onSuccess?: (response: object, file: RcFile, xhr: object) => void;
2222
onProgress?: (event: UploadProgressEvent, file: RcFile) => void;
23-
beforeUpload?: (file: RcFile, FileList: RcFile[]) => boolean | Promise<RcFile>;
24-
customRequest?: () => void;
23+
beforeUpload?: (file: RcFile, FileList: RcFile[]) => boolean | Promise<void | File | Blob>;
24+
customRequest?: (option: UploadRequestOption) => void;
2525
withCredentials?: boolean;
2626
openFileDialogOnClick?: boolean;
2727
transformFile?: (file: RcFile) => string | Blob | RcFile | PromiseLike<string | Blob | RcFile>;

0 commit comments

Comments
 (0)