vue3-dropzone icon indicating copy to clipboard operation
vue3-dropzone copied to clipboard

onDrop should use File[] instead of any[] for acceptedFiles parameter

Open hkiame opened this issue 8 months ago • 0 comments

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 File objects are processed.
  • Improved DX (Developer Experience) - TypeScript will properly infer properties on acceptedFiles without requiring manual type casting.
  • Consistency - The parameter is supposed to represent accepted files, and files in JavaScript are represented as File objects.

hkiame avatar Feb 19 '25 23:02 hkiame