Stricter typescript definitions #2922
Labels
Help Wanted
Indicates that we’d especially appreciate community input in this issue
Types
Issues relating to the Typescript definition files
The typescript definitions are a big help already, but on first sight they could be much stricter, and thus make development safer.
For example, the
Event
-type form@uppy/core
resolves totype Event = LiteralUnion<'file-added' | 'file-removed' | 'upload' | 'upload-progress' | 'upload-success' | 'complete' | 'error' | 'upload-error' | 'upload-retry' | 'info-visible' | 'info-hidden' | 'cancel-all' | 'restriction-failed' | 'reset-progress' | string & { };
which seems not quite ideal to me. This could to this exaggerated erroneous call touppy.on
:uppy.on('upload-errrOOOoooOOOOOrrrr'
. Therefore I'd suggest to make these types stricter, and in the same run remove all the most of theany
-types if possibleThe text was updated successfully, but these errors were encountered: