Skip to content

Commit e473a37

Browse files
Merge pull request #152 from fixd/successCallBack
Success Callback has response
2 parents 6f244d2 + 15c45cf commit e473a37

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

typescript/types.d.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ type UploadProgressCallback = (file: Dropzone.DropzoneFile, progress: number, by
1414
type TotalUploadProgressCallback = (totalProgress: number, totalBytes: number, totalBytesSent: number) => any;
1515
type SendingCallback = (file: Dropzone.DropzoneFile, xhr: XMLHttpRequest, formData: FormData) => any;
1616
type SendingMultipleCallback = (files: Dropzone.DropzoneFile[], xhr: XMLHttpRequest, formData: FormData) => any;
17+
type SuccessCallback = (file: Dropzone.DropzoneFile, response: Object | string) => any;
18+
type SuccessMultipleCallback = (files: Dropzone.DropzoneFile[], responseText: string) => any;
1719

1820
/* handlers based on ts definitions for Dropzone.js (@types/dropzone) */
1921
export declare interface DropzoneComponentHandlers {
@@ -47,8 +49,8 @@ export declare interface DropzoneComponentHandlers {
4749
sending?: SendingCallback | SendingCallback[];
4850
sendingmultiple?: SendingMultipleCallback | SendingMultipleCallback[];
4951

50-
success?: FileCallback | FileCallback[];
51-
successmultiple?: FileArrayCallback | FileArrayCallback[];
52+
success?: SuccessCallback | SuccessCallback[];
53+
successmultiple?: SuccessMultipleCallback | SuccessMultipleCallback[];
5254

5355
canceled?: FileCallback | FileCallback[];
5456
canceledmultiple?: FileArrayCallback | FileArrayCallback[];

0 commit comments

Comments
 (0)