mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-06 13:11:46 +00:00
add dictUploadCanceled to DropzoneOptions & make JQuery interface global & add access to Dropzone via HTMLElement
This commit is contained in:
@@ -57,6 +57,7 @@ const dropzoneWithOptions = new Dropzone(".test", {
|
||||
dictRemoveFileConfirmation: "",
|
||||
dictMaxFilesExceeded: "",
|
||||
dictFileSizeUnits: { tb: "", gb: "", mb: "", kb: "", b: "" },
|
||||
dictUploadCanceled: "",
|
||||
|
||||
accept: (file: Dropzone.DropzoneFile, done: (error?: string | Error) => void) => {
|
||||
if (file.accepted) {
|
||||
@@ -228,6 +229,8 @@ dropzone.resizeImage(firstFile, 120, 120);
|
||||
dropzone.resizeImage(firstFile, 120, 120, 'contain');
|
||||
dropzone.resizeImage(firstFile, 120, 120, 'contain', function () { });
|
||||
|
||||
document.createElement("div").dropzone;
|
||||
|
||||
dropzone
|
||||
.on("drop", () => {
|
||||
console.count('drop');
|
||||
|
||||
Vendored
+9
-2
@@ -81,6 +81,7 @@ declare namespace Dropzone {
|
||||
dictRemoveFileConfirmation?: string;
|
||||
dictMaxFilesExceeded?: string;
|
||||
dictFileSizeUnits?: DropzoneDictFileSizeUnits;
|
||||
dictUploadCanceled?: string;
|
||||
|
||||
accept?(file: DropzoneFile, done: (error?: string | Error) => void): void;
|
||||
init?(): void;
|
||||
@@ -299,8 +300,14 @@ declare class Dropzone {
|
||||
|
||||
}
|
||||
|
||||
interface JQuery {
|
||||
dropzone(options: Dropzone.DropzoneOptions): Dropzone;
|
||||
declare global {
|
||||
interface JQuery {
|
||||
dropzone(options: Dropzone.DropzoneOptions): Dropzone;
|
||||
}
|
||||
|
||||
interface HTMLElement {
|
||||
dropzone: Dropzone;
|
||||
}
|
||||
}
|
||||
|
||||
export = Dropzone;
|
||||
|
||||
Reference in New Issue
Block a user