VS Code 1.28 Extension API

This commit is contained in:
Pine Wu 2019-03-24 18:52:48 -07:00
parent 9f36a45263
commit 9fc8b3a09c

View File

@ -1,4 +1,4 @@
// Type definitions for Visual Studio Code 1.27
// Type definitions for Visual Studio Code 1.28
// Project: https://github.com/microsoft/vscode
// Definitions by: Visual Studio Code Team, Microsoft <https://github.com/Microsoft>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@ -10,7 +10,7 @@
*--------------------------------------------------------------------------------------------*/
/**
* Type Definition for Visual Studio Code 1.27 Extension API
* Type Definition for Visual Studio Code 1.28 Extension API
* See https://code.visualstudio.com/api for more information
*/
@ -3034,8 +3034,8 @@ declare module 'vscode' {
export class ParameterInformation {
/**
* The label of this signature. Will be shown in
* the UI.
* The label of this signature. *Note*: Must be a substring of its
* containing signature information's [label](#SignatureInformation.label).
*/
label: string;
@ -4096,9 +4096,8 @@ declare module 'vscode' {
source?: string;
/**
* A code or identifier for this diagnostics. Will not be surfaced
* to the user, but should be used for later processing, e.g. when
* providing [code actions](#CodeActionContext).
* A code or identifier for this diagnostic.
* Should be used for later processing, e.g. when providing [code actions](#CodeActionContext).
*/
code?: string | number;
@ -4825,7 +4824,10 @@ declare module 'vscode' {
executable?: string;
/**
* The arguments to be passed to the shell executable used to run the task.
* The arguments to be passed to the shell executable used to run the task. Most shells
* require special arguments to execute a command. For example `bash` requires the `-c`
* argument to execute a command, `PowerShell` requires `-Command` and `cmd` requires both
* `/d` and `/c`.
*/
shellArgs?: string[];
@ -6232,7 +6234,7 @@ declare module 'vscode' {
export function createInputBox(): InputBox;
/**
* Create a new [output channel](#OutputChannel) with the given name.
* Creates a new [output channel](#OutputChannel) with the given name.
*
* @param name Human-readable string which will be used to represent the channel in the UI.
*/
@ -7336,7 +7338,8 @@ declare module 'vscode' {
export function registerTextDocumentContentProvider(scheme: string, provider: TextDocumentContentProvider): Disposable;
/**
* An event that is emitted when a [text document](#TextDocument) is opened.
* An event that is emitted when a [text document](#TextDocument) is opened or when the language id
* of a text document [has been changed](#languages.setTextDocumentLanguage).
*
* To add an event listener when a visible text document is opened, use the [TextEditor](#TextEditor) events in the
* [window](#window) namespace. Note that:
@ -7349,7 +7352,8 @@ declare module 'vscode' {
export const onDidOpenTextDocument: Event<TextDocument>;
/**
* An event that is emitted when a [text document](#TextDocument) is disposed.
* An event that is emitted when a [text document](#TextDocument) is disposed or when the language id
* of a text document [has been changed](#languages.setTextDocumentLanguage).
*
* To add an event listener when a visible text document is closed, use the [TextEditor](#TextEditor) events in the
* [window](#window) namespace. Note that this event is not emitted when a [TextEditor](#TextEditor) is closed
@ -7480,6 +7484,19 @@ declare module 'vscode' {
*/
export function getLanguages(): Thenable<string[]>;
/**
* Set (and change) the [language](#TextDocument.languageId) that is associated
* with the given document.
*
* *Note* that calling this function will trigger the [`onDidCloseTextDocument`](#workspace.onDidCloseTextDocument) event
* followed by the [`onDidOpenTextDocument`](#workspace.onDidOpenTextDocument) event.
*
* @param document The document which language is to be changed
* @param languageId The new language identifier.
* @returns A thenable that resolves with the updated document.
*/
export function setTextDocumentLanguage(document: TextDocument, languageId: string): Thenable<TextDocument>;
/**
* Compute the match between a document [selector](#DocumentSelector) and a document. Values
* greater than zero mean the selector matches the document.
@ -8142,11 +8159,12 @@ declare module 'vscode' {
* If more than one debug configuration provider is registered for the same type, the resolveDebugConfiguration calls are chained
* in arbitrary order and the initial debug configuration is piped through the chain.
* Returning the value 'undefined' prevents the debug session from starting.
* Returning the value 'null' prevents the debug session from starting and opens the underlying debug configuration instead.
*
* @param folder The workspace folder from which the configuration originates from or undefined for a folderless setup.
* @param debugConfiguration The [debug configuration](#DebugConfiguration) to resolve.
* @param token A cancellation token.
* @return The resolved debug configuration or undefined.
* @return The resolved debug configuration or undefined or null.
*/
resolveDebugConfiguration?(folder: WorkspaceFolder | undefined, debugConfiguration: DebugConfiguration, token?: CancellationToken): ProviderResult<DebugConfiguration>;
}