Skip to content

Commit

Permalink
some jsdoc for #34664
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Dec 13, 2017
1 parent a284f0a commit ed39dcd
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions src/vs/vscode.proposed.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,22 +199,15 @@ declare module 'vscode' {
//#endregion

/**
* Represents an action that can be performed in code.
*
* Shown using the [light bulb](https://code.visualstudio.com/docs/editor/editingevolved#_code-action)
* A code action represents a change that can be performed in code, e.g. to fix a problem or
* to refactor code.
*/
export class CodeAction {
/**
* Label used to identify the code action in UI.
*/
title: string;

/**
* Optional command that performs the code action.
*
* Executed after `edits` if any edits are provided. Either `command` or `edits` must be provided for a `CodeAction`.
* A short, human-readanle, title for this code action.
*/
command?: Command;
title: string;

/**
* Optional edit that performs the code action.
Expand All @@ -228,6 +221,22 @@ declare module 'vscode' {
*/
diagnostics?: Diagnostic[];

/**
* Optional command that performs the code action.
*
* Executed after `edits` if any edits are provided. Either `command` or `edits` must be provided for a `CodeAction`.
*/
command?: Command;

/**
* Creates a new code action.
*
* A code action must have at least a [title](#CodeAction.title) and either [edits](#CodeAction.edits)
* or a [command](#CodeAction.command).
*
* @param title The title of the code action.
* @param edits The edit of the code action.
*/
constructor(title: string, edits?: TextEdit[] | WorkspaceEdit);
}

Expand Down

0 comments on commit ed39dcd

Please sign in to comment.