API

Parameter

KeyTypeDefaultDescription
multiplebooleanfalseSelectable multiple
acceptstring | string[]'''.png' ['.jpg', '.svg']
strictbooleanfalseStrict mode

Type Definition

fileDialog<T, U>(parameters?: Partial<Parameters<T, U>>): Promise<PickFile<T, U>>

interface Parameters<T extends boolean = false, U extends boolean = false> {
    accept: string | string[];
    multiple: T;
    strict: U;
}
declare type PickFile<T extends boolean = false, U extends boolean = false> = T extends false ? (U extends true ? File : FileList) : FileList;
ParameterReturn value
{multiple: false, strict: true}File
*FileList