Hyperlinkv0.8.0-beta.28

FileSystem

FileSystem.isFileconsteffect/FileSystem.ts:1080
(u: unknown): u is File

Returns true if a value is a File handle by checking for the FileTypeId marker.

When to use

Use when accepting an unknown value and you need to narrow it to a File before calling file-handle operations.

Details

This is a structural marker check. It does not validate the marker value or the shape of the file handle.

export const isFile = (u: unknown): u is File => hasProperty(u, FileTypeId)