UNPKG

@fgv/ts-web-extras

Version:

Browser-compatible utilities and FileTree implementations

73 lines (34 loc) 1.13 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@fgv/ts-web-extras](./ts-web-extras.md) &gt; [safeShowOpenFilePicker](./ts-web-extras.safeshowopenfilepicker.md) ## safeShowOpenFilePicker() function Safely access showOpenFilePicker with proper type checking **Signature:** ```typescript export declare function safeShowOpenFilePicker(window: Window, options?: ShowOpenFilePickerOptions): Promise<FileSystemFileHandle[] | null>; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> window </td><td> Window </td><td> The window object </td></tr> <tr><td> options </td><td> [ShowOpenFilePickerOptions](./ts-web-extras.showopenfilepickeroptions.md) </td><td> _(Optional)_ Options for the file picker </td></tr> </tbody></table> **Returns:** Promise&lt;[FileSystemFileHandle](./ts-web-extras.filesystemfilehandle_2.md)<!-- -->\[\] \| null&gt; Promise with file handles or null if not supported