@fgv/ts-web-extras
Version:
Browser-compatible utilities and FileTree implementations
73 lines (34 loc) • 1.13 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@fgv/ts-web-extras](./ts-web-extras.md) > [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<[FileSystemFileHandle](./ts-web-extras.filesystemfilehandle_2.md)<!-- -->\[\] \| null>
Promise with file handles or null if not supported