From 5c8227802b833adee9494f3423dad22138b86d5d Mon Sep 17 00:00:00 2001 From: Dmitry Zeldin Date: Sat, 16 Mar 2024 22:25:23 +0000 Subject: [PATCH] Add inexact object def --- lib/dom.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/dom.js b/lib/dom.js index 88025dc413e..07f425d393d 100644 --- a/lib/dom.js +++ b/lib/dom.js @@ -4546,7 +4546,7 @@ type WindowFileSystemPickerFileType = { }, }; -type WindowBaseFilePickerOptions = { +type WindowBaseFilePickerOptions = {| id?: number, startIn?: | FileSystemHandle @@ -4556,24 +4556,24 @@ type WindowBaseFilePickerOptions = { | "music" | "pictures" | "videos", -}; +|}; -type WindowFilePickerOptions = WindowBaseFilePickerOptions & { +type WindowFilePickerOptions = WindowBaseFilePickerOptions & {| excludeAcceptAllOption?: boolean, types?: Array, -}; +|}; -type WindowOpenFilePickerOptions = WindowFilePickerOptions & { +type WindowOpenFilePickerOptions = WindowFilePickerOptions & {| multiple?: boolean, -}; +|}; -type WindowSaveFilePickerOptions = WindowFilePickerOptions & { +type WindowSaveFilePickerOptions = WindowFilePickerOptions & {| suggestedName?: string, -}; +|}; -type WindowDirectoryFilePickerOptions = WindowBaseFilePickerOptions & { +type WindowDirectoryFilePickerOptions = WindowBaseFilePickerOptions & {| mode?: "read" | "readwrite", -}; +|}; // https://wicg.github.io/file-system-access/#api-showopenfilepicker declare function showOpenFilePicker(