UNPKG

@fgv/ts-web-extras

Version:

Browser-compatible utilities and FileTree implementations

73 lines (34 loc) 1.14 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; [safeShowDirectoryPicker](./ts-web-extras.safeshowdirectorypicker.md) ## safeShowDirectoryPicker() function Safely access showDirectoryPicker with proper type checking **Signature:** ```typescript export declare function safeShowDirectoryPicker(window: Window, options?: ShowDirectoryPickerOptions): Promise<FileSystemDirectoryHandle | 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> [ShowDirectoryPickerOptions](./ts-web-extras.showdirectorypickeroptions.md) </td><td> _(Optional)_ Options for the directory picker </td></tr> </tbody></table> **Returns:** Promise&lt;[FileSystemDirectoryHandle](./ts-web-extras.filesystemdirectoryhandle_2.md) \| null&gt; Promise with directory handle or null if not supported