vue3-dropzone
vue3-dropzone copied to clipboard
onDrop should use File[] instead of any[] for acceptedFiles parameter
Currently, the onDrop function in vue3-dropzone has the following type signature:
onDrop: (acceptedFiles: any[], rejectReasons: FileRejectReason[], event: Event) => void
This ensures:
- Better Type Safety - Ensures only valid
Fileobjects are processed. - Improved DX (Developer Experience) - TypeScript will properly infer properties on
acceptedFileswithout requiring manual type casting. - Consistency - The parameter is supposed to represent accepted files, and files in JavaScript are represented as File objects.