Skip to content

Commit

Permalink
Add multiselect typing for File.openDlg and openDialog (resolve #91)
Browse files Browse the repository at this point in the history
  • Loading branch information
zlovatt committed Dec 13, 2023
1 parent d722bfb commit d0df42f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions shared/JavaScript.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1499,7 +1499,9 @@ interface FileConstructor {
* @param filter A filter that limits the types of files displayed in the dialog. In Windows,a filter expression such as "Javascript files:*.jsx;All files:*.*". In Mac OS, a filter function that takes a File instance and returns true if the file should be included in the display, false if it should not.
* @param multiSelect When true, the user can select multiple files and the return value is an array.
*/
openDialog(prompt?: string, filter?: any, multiSelect?: boolean): File
openDialog(prompt?: string, filter?: string | Function, multiSelect?: boolean): File | File[]
openDialog(prompt: string, filter: string | Function, multiSelect: false): File
openDialog(prompt: string, filter: string | Function, multiSelect: true): File[]

/**
* Opens a dialog so the user can select a file name to save to.
Expand Down Expand Up @@ -1689,7 +1691,9 @@ interface File {
* @param filter A filter that limits the types of files displayed in the dialog. In Windows,a filter expression such as "Javascript files:*.jsx;All files:*.*". In Mac OS, a filter function that takes a File instance and returns true if the file should be included in the display, false if it should not.
* @param multiSelect When true, the user can select multiple files and the return value is an array.
*/
openDlg(prompt?: string, filter?: any, multiSelect?: boolean): File
openDlg(prompt?: string, filter?: string | Function, multiSelect?: boolean): File | File[]
openDlg(prompt: string, filter: string | Function, multiSelect: false): File
openDlg(prompt: string, filter: string | Function, multiSelect: true): File[]

/**
* Reads the contents of the file, starting at the current position.
Expand Down

0 comments on commit d0df42f

Please sign in to comment.