-
-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Small suggestion to improve the type of the acceptedFiles param.
In my project I use:
type NonEmptyArray<T = unknown> = [T, ...T[]];
type UniqueFileTypeSpecifier = `${string}/${string}` | `.${string}`;
type AcceptedFiles = UniqueFileTypeSpecifier | NonEmptyArray<UniqueFileTypeSpecifier>
Not perfect but it does at least give some indicator. I don't use the comma-separated feature but my type should also allow that.
Metadata
Metadata
Assignees
Labels
No labels