Skip to content

Home > @jview/utils > isFile

isFile() function

是否是 File 类型,File 类型也是 Blob 的子类型

Signature:

typescript
export declare function isFile<T extends File>(val: unknown): val is T;
export declare function isFile<T extends File>(val: unknown): val is T;

Parameters

ParameterTypeDescription
valunknown

Returns:

val is T