Skip to content

Commit

Permalink
compile jsdoc comments, #43768
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Nov 19, 2019
1 parent 458177f commit 1ba8fc6
Showing 1 changed file with 121 additions and 13 deletions.
134 changes: 121 additions & 13 deletions src/vs/vscode.proposed.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -826,63 +826,171 @@ declare module 'vscode' {

//#region mjbvz,joh: https://github.com/Microsoft/vscode/issues/43768

export interface FileCreateEvent {

/**
* The files that got created.
*/
readonly files: ReadonlyArray<Uri>;
}

/**
* An event that is fired when files are going to be created.
*
* To make modifications to the workspace before the files are created,
* call the [`waitUntil](#FileWillCreateEvent.waitUntil)-function with a
* thenable that resolves to a [workspace edit](#WorkspaceEdit).
*/
export interface FileWillCreateEvent {

/**
* The files that are going to be created.
*/
readonly files: ReadonlyArray<Uri>;

/**
* Allows to pause the event and to apply a [workspace edit](#WorkspaceEdit).
*
* *Note:* This function can only be called during event dispatch and not
* in an asynchronous manner:
*
* ```ts
* workspace.onWillCreateFiles(event => {
* // async, will *throw* an error
* setTimeout(() => event.waitUntil(promise));
*
* // sync, OK
* event.waitUntil(promise);
* })
* ```
*
* @param thenable A thenable that delays saving.
*/
waitUntil(thenable: Thenable<WorkspaceEdit>): void;

/**
* Allows to pause the event until the provided thenable resolves.
*
* *Note:* This function can only be called during event dispatch.
*
* @param thenable A thenable that delays saving.
*/
waitUntil(thenable: Thenable<any>): void;
}

export interface FileDeleteEvent {
/**
* An event that is fired after files are created.
*/
export interface FileCreateEvent {

/**
* The files that got deleted.
* The files that got created.
*/
readonly files: ReadonlyArray<Uri>;
}

/**
* An event that is fired when files are going to be deleted.
*
* To make modifications to the workspace before the files are deleted,
* call the [`waitUntil](#FileWillCreateEvent.waitUntil)-function with a
* thenable that resolves to a [workspace edit](#WorkspaceEdit).
*/
export interface FileWillDeleteEvent {

/**
* The files that are going to be deleted.
*/
readonly files: ReadonlyArray<Uri>;

/**
* Allows to pause the event and to apply a [workspace edit](#WorkspaceEdit).
*
* *Note:* This function can only be called during event dispatch and not
* in an asynchronous manner:
*
* ```ts
* workspace.onWillCreateFiles(event => {
* // async, will *throw* an error
* setTimeout(() => event.waitUntil(promise));
*
* // sync, OK
* event.waitUntil(promise);
* })
* ```
*
* @param thenable A thenable that delays saving.
*/
waitUntil(thenable: Thenable<WorkspaceEdit>): void;

/**
* Allows to pause the event until the provided thenable resolves.
*
* *Note:* This function can only be called during event dispatch.
*
* @param thenable A thenable that delays saving.
*/
waitUntil(thenable: Thenable<any>): void;
}

export interface FileRenameEvent {
/**
* An event that is fired after files are deleted.
*/
export interface FileDeleteEvent {

/**
* The files that got renamed.
* The files that got deleted.
*/
readonly files: ReadonlyArray<{ oldUri: Uri, newUri: Uri }>;
readonly files: ReadonlyArray<Uri>;
}

/**
* An event that is fired when files are going to be renamed.
*
* To make modifications to the workspace before the files are renamed,
* call the [`waitUntil](#FileWillCreateEvent.waitUntil)-function with a
* thenable that resolves to a [workspace edit](#WorkspaceEdit).
*/
export interface FileWillRenameEvent {

/**
* The files that are going to be renamed.
*/
readonly files: ReadonlyArray<{ oldUri: Uri, newUri: Uri }>;

/**
* Allows to pause the event and to apply a [workspace edit](#WorkspaceEdit).
*
* *Note:* This function can only be called during event dispatch and not
* in an asynchronous manner:
*
* ```ts
* workspace.onWillCreateFiles(event => {
* // async, will *throw* an error
* setTimeout(() => event.waitUntil(promise));
*
* // sync, OK
* event.waitUntil(promise);
* })
* ```
*
* @param thenable A thenable that delays saving.
*/
waitUntil(thenable: Thenable<WorkspaceEdit>): void;

/**
* Allows to pause the event until the provided thenable resolves.
*
* *Note:* This function can only be called during event dispatch.
*
* @param thenable A thenable that delays saving.
*/
waitUntil(thenable: Thenable<any>): void;
}

/**
* An event that is fired after files are renamed.
*/
export interface FileRenameEvent {

/**
* The files that got renamed.
*/
readonly files: ReadonlyArray<{ oldUri: Uri, newUri: Uri }>;
}

export namespace workspace {

/**
Expand Down

0 comments on commit 1ba8fc6

Please sign in to comment.