Skip to content

Commit

Permalink
add jsdoc, #13807
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Sep 21, 2017
1 parent c7630e1 commit 97de616
Showing 1 changed file with 67 additions and 2 deletions.
69 changes: 67 additions & 2 deletions src/vs/vscode.proposed.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,88 @@
declare module 'vscode' {

export interface OpenDialogOptions {
/**
* The resource the dialog shows when opened.
*/
defaultUri?: Uri;

/**
* A human-readable string for the open button.
*/
openLabel?: string;

/**
* Only allow to select files. *Note* that not all operating systems support
* to select files and folders in one dialog instance.
*/
openFiles?: boolean;

/**
* Only allow to select folders. *Note* that not all operating systems support
* to select files and folders in one dialog instance.
*/
openFolders?: boolean;

/**
* Allow to select many files or folders.
*/
openMany?: boolean;

/**
* A set of file filters that are shown in the dialog, e.g.
* ```ts
* {
* ['Images']: ['*.png', '*.jpg']
* ['TypeScript']: ['*.ts', '*.tsx']
* }
* ```
*/
filters: { [name: string]: string[] };
}

/**
* Options to configure the behaviour of a file save dialog
*/
export interface SaveDialogOptions {
/**
* The resource the dialog shows when opened.
*/
defaultUri?: Uri;

/**
* A human-readable string for the save button.
*/
saveLabel?: string;

/**
* A set of file filters that are shown in the dialog, e.g.
* ```ts
* {
* ['Images']: ['*.png', '*.jpg']
* ['TypeScript']: ['*.ts', '*.tsx']
* }
* ```
*/
filters: { [name: string]: string[] };
}

export namespace window {
export function showOpenDialog(options: OpenDialogOptions): Thenable<Uri[]>;
export function showSaveDialog(options: SaveDialogOptions): Thenable<Uri>;

/**
* Shows a file open dialog to the user.
*
* @param options Options that control the dialog.
* @returns A promise that resolves to the selected resources or `undefined`.
*/
export function showOpenDialog(options: OpenDialogOptions): Thenable<Uri[] | undefined>;

/**
* Shows a file save dialog to the user.
*
* @param options Options that control the dialog.
* @returns A promise that resolves to the selected resource or `undefined`.
*/
export function showSaveDialog(options: SaveDialogOptions): Thenable<Uri | undefined>;

/**
* Shows a selection list of [workspace folders](#workspace.workspaceFolders) to pick from.
Expand Down

0 comments on commit 97de616

Please sign in to comment.