@types/vscode

  • Version 1.59.0
  • Published
  • 572 kB
  • No dependencies
  • MIT license

Install

npm i @types/vscode
yarn add @types/vscode
pnpm add @types/vscode

Overview

TypeScript definitions for Visual Studio Code

Index

Namespaces

Namespaces

namespace vscode

module 'vscode' {}
  • Type Definition for Visual Studio Code 1.59 Extension API See https://code.visualstudio.com/api for more information

variable version

const version: string;
  • The version of the editor.

class Breakpoint

class Breakpoint {}
  • The base class of all breakpoint types.

constructor

protected constructor(
enabled?: boolean,
condition?: string,
hitCondition?: string,
logMessage?: string
);

    property condition

    readonly condition?: string;
    • An optional expression for conditional breakpoints.

    property enabled

    readonly enabled: boolean;
    • Is breakpoint enabled.

    property hitCondition

    readonly hitCondition?: string;
    • An optional expression that controls how many hits of the breakpoint are ignored.

    property id

    readonly id: string;
    • The unique ID of the breakpoint.

    property logMessage

    readonly logMessage?: string;
    • An optional message that gets logged when this breakpoint is hit. Embedded expressions within {} are interpolated by the debug adapter.

    class CallHierarchyIncomingCall

    class CallHierarchyIncomingCall {}
    • Represents an incoming call, e.g. a caller of a method or constructor.

    constructor

    constructor(item: CallHierarchyItem, fromRanges: Range[]);
    • Create a new call object.

      Parameter item

      The item making the call.

      Parameter fromRanges

      The ranges at which the calls appear.

    property from

    from: CallHierarchyItem;
    • The item that makes the call.

    property fromRanges

    fromRanges: Range[];
    • The range at which at which the calls appears. This is relative to the caller denoted by .

    class CallHierarchyItem

    class CallHierarchyItem {}
    • Represents programming constructs like functions or constructors in the context of call hierarchy.

    constructor

    constructor(
    kind: SymbolKind,
    name: string,
    detail: string,
    uri: Uri,
    range: Range,
    selectionRange: Range
    );
    • Creates a new call hierarchy item.

    property detail

    detail?: string;
    • More detail for this item, e.g. the signature of a function.

    property kind

    kind: SymbolKind;
    • The kind of this item.

    property name

    name: string;
    • The name of this item.

    property range

    range: Range;
    • The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g. comments and code.

    property selectionRange

    selectionRange: Range;
    • The range that should be selected and revealed when this symbol is being picked, e.g. the name of a function. Must be contained by the .

    property tags

    tags?: readonly SymbolTag[];
    • Tags for this item.

    property uri

    uri: Uri;
    • The resource identifier of this item.

    class CallHierarchyOutgoingCall

    class CallHierarchyOutgoingCall {}
    • Represents an outgoing call, e.g. calling a getter from a method or a method from a constructor etc.

    constructor

    constructor(item: CallHierarchyItem, fromRanges: Range[]);
    • Create a new call object.

      Parameter item

      The item being called

      Parameter fromRanges

      The ranges at which the calls appear.

    property fromRanges

    fromRanges: Range[];
    • The range at which this item is called. This is the range relative to the caller, e.g the item passed to and not .

    property to

    to: CallHierarchyItem;
    • The item that is called.

    class CancellationError

    class CancellationError extends Error {}
    • An error type that should be used to signal cancellation of an operation.

      This type can be used in response to a being cancelled or when an operation is being cancelled by the executor of that operation.

    constructor

    constructor();
    • Creates a new cancellation error.

    class CancellationTokenSource

    class CancellationTokenSource {}
    • A cancellation source creates and controls a .

    property token

    token: CancellationToken;
    • The cancellation token of this source.

    method cancel

    cancel: () => void;
    • Signal cancellation on the token.

    method dispose

    dispose: () => void;
    • Dispose object and free resources.

    class CodeAction

    class CodeAction {}
    • A code action represents a change that can be performed in code, e.g. to fix a problem or to refactor code.

      A CodeAction must set either and/or a . If both are supplied, the edit is applied first, then the command is executed.

    constructor

    constructor(title: string, kind?: CodeActionKind);
    • Creates a new code action.

      A code action must have at least a and and/or a .

      Parameter title

      The title of the code action.

      Parameter kind

      The kind of the code action.

    property command

    command?: Command;
    • A Command this code action executes.

      If this command throws an exception, the editor displays the exception message to users in the editor at the current cursor position.

    property diagnostics

    diagnostics?: Diagnostic[];
    • that this code action resolves.

    property disabled

    disabled?: { readonly reason: string };
    • Marks that the code action cannot currently be applied.

      - Disabled code actions are not shown in automatic [lightbulb](https://code.visualstudio.com/docs/editor/editingevolved#_code-action) code action menu.

      - Disabled actions are shown as faded out in the code action menu when the user request a more specific type of code action, such as refactorings.

      - If the user has a [keybinding](https://code.visualstudio.com/docs/editor/refactoring#_keybindings-for-code-actions) that auto applies a code action and only a disabled code actions are returned, the editor will show the user an error message with reason in the editor.

    property edit

    edit?: WorkspaceEdit;
    • A this code action performs.

    property isPreferred

    isPreferred?: boolean;
    • Marks this as a preferred action. Preferred actions are used by the auto fix command and can be targeted by keybindings.

      A quick fix should be marked preferred if it properly addresses the underlying error. A refactoring should be marked preferred if it is the most reasonable choice of actions to take.

    property kind

    kind?: CodeActionKind;
    • of the code action.

      Used to filter code actions.

    property title

    title: string;
    • A short, human-readable, title for this code action.

    class CodeActionKind

    class CodeActionKind {}
    • Kind of a code action.

      Kinds are a hierarchical list of identifiers separated by ., e.g. "refactor.extract.function".

      Code action kinds are used by the editor for UI elements such as the refactoring context menu. Users can also trigger code actions with a specific kind with the editor.action.codeAction command.

    property Empty

    static readonly Empty: CodeActionKind;
    • Empty kind.

    property QuickFix

    static readonly QuickFix: CodeActionKind;
    • Base kind for quickfix actions: quickfix.

      Quick fix actions address a problem in the code and are shown in the normal code action context menu.

    property Refactor

    static readonly Refactor: CodeActionKind;
    • Base kind for refactoring actions: refactor

      Refactoring actions are shown in the refactoring context menu.

    property RefactorExtract

    static readonly RefactorExtract: CodeActionKind;
    • Base kind for refactoring extraction actions: refactor.extract

      Example extract actions:

      - Extract method - Extract function - Extract variable - Extract interface from class - ...

    property RefactorInline

    static readonly RefactorInline: CodeActionKind;
    • Base kind for refactoring inline actions: refactor.inline

      Example inline actions:

      - Inline function - Inline variable - Inline constant - ...

    property RefactorRewrite

    static readonly RefactorRewrite: CodeActionKind;
    • Base kind for refactoring rewrite actions: refactor.rewrite

      Example rewrite actions:

      - Convert JavaScript function to class - Add or remove parameter - Encapsulate field - Make method static - Move method to base class - ...

    property Source

    static readonly Source: CodeActionKind;
    • Base kind for source actions: source

      Source code actions apply to the entire file. They must be explicitly requested and will not show in the normal [lightbulb](https://code.visualstudio.com/docs/editor/editingevolved#_code-action) menu. Source actions can be run on save using editor.codeActionsOnSave and are also shown in the source context menu.

    property SourceFixAll

    static readonly SourceFixAll: CodeActionKind;
    • Base kind for auto-fix source actions: source.fixAll.

      Fix all actions automatically fix errors that have a clear fix that do not require user input. They should not suppress errors or perform unsafe fixes such as generating new types or classes.

    property SourceOrganizeImports

    static readonly SourceOrganizeImports: CodeActionKind;
    • Base kind for an organize imports source action: source.organizeImports.

    property value

    readonly value: string;
    • String value of the kind, e.g. "refactor.extract.function".

    method append

    append: (parts: string) => CodeActionKind;
    • Create a new kind by appending a more specific selector to the current kind.

      Does not modify the current kind.

    method contains

    contains: (other: CodeActionKind) => boolean;
    • Checks if other is a sub-kind of this CodeActionKind.

      The kind "refactor.extract" for example contains "refactor.extract" and ``"refactor.extract.function"`, but not "unicorn.refactor.extract", or "refactor.extractAll" or refactor.

      Parameter other

      Kind to check.

    method intersects

    intersects: (other: CodeActionKind) => boolean;
    • Checks if this code action kind intersects other.

      The kind "refactor.extract" for example intersects refactor, "refactor.extract" and ``"refactor.extract.function"`, but not "unicorn.refactor.extract", or "refactor.extractAll".

      Parameter other

      Kind to check.

    class CodeLens

    class CodeLens {}
    • A code lens represents a Command that should be shown along with source text, like the number of references, a way to run tests, etc.

      A code lens is _unresolved_ when no command is associated to it. For performance reasons the creation of a code lens and resolving should be done to two stages.

      See Also

    constructor

    constructor(range: Range, command?: Command);
    • Creates a new code lens object.

      Parameter range

      The range to which this code lens applies.

      Parameter command

      The command associated to this code lens.

    property command

    command?: Command;
    • The command this code lens represents.

    property isResolved

    readonly isResolved: boolean;
    • true when there is a command associated.

    property range

    range: Range;
    • The range in which this code lens is valid. Should only span a single line.

    class Color

    class Color {}
    • Represents a color in RGBA space.

    constructor

    constructor(red: number, green: number, blue: number, alpha: number);
    • Creates a new color instance.

      Parameter red

      The red component.

      Parameter green

      The green component.

      Parameter blue

      The blue component.

      Parameter alpha

      The alpha component.

    property alpha

    readonly alpha: number;
    • The alpha component of this color in the range [0-1].

    property blue

    readonly blue: number;
    • The blue component of this color in the range [0-1].

    property green

    readonly green: number;
    • The green component of this color in the range [0-1].

    property red

    readonly red: number;
    • The red component of this color in the range [0-1].

    class ColorInformation

    class ColorInformation {}
    • Represents a color range from a document.

    constructor

    constructor(range: Range, color: Color);
    • Creates a new color range.

      Parameter range

      The range the color appears in. Must not be empty.

      Parameter color

      The value of the color.

      Parameter format

      The format in which this color is currently formatted.

    property color

    color: Color;
    • The actual color value for this color range.

    property range

    range: Range;
    • The range in the document where this color appears.

    class ColorPresentation

    class ColorPresentation {}
    • A color presentation object describes how a should be represented as text and what edits are required to refer to it from source code.

      For some languages one color can have multiple presentations, e.g. css can represent the color red with the constant Red, the hex-value #ff0000, or in rgba and hsla forms. In csharp other representations apply, e.g. System.Drawing.Color.Red.

    constructor

    constructor(label: string);
    • Creates a new color presentation.

      Parameter label

      The label of this color presentation.

    property additionalTextEdits

    additionalTextEdits?: TextEdit[];
    • An optional array of additional that are applied when selecting this color presentation. Edits must not overlap with the main nor with themselves.

    property label

    label: string;
    • The label of this color presentation. It will be shown on the color picker header. By default this is also the text that is inserted when selecting this color presentation.

    property textEdit

    textEdit?: TextEdit;
    • An which is applied to a document when selecting this presentation for the color. When falsy the is used.

    class CompletionItem

    class CompletionItem {}
    • A completion item represents a text snippet that is proposed to complete text that is being typed.

      It is sufficient to create a completion item from just a . In that case the completion item will replace the until the cursor with the given label or . Otherwise the given is used.

      When selecting a completion item in the editor its defined or synthesized text edit will be applied to *all* cursors/selections whereas will be applied as provided.

      See Also

    constructor

    constructor(label: string | CompletionItemLabel, kind?: CompletionItemKind);
    • Creates a new completion item.

      Completion items must have at least a which then will be used as insert text as well as for sorting and filtering.

      Parameter label

      The label of the completion.

      Parameter kind

      The of the completion.

    property additionalTextEdits

    additionalTextEdits?: TextEdit[];
    • An optional array of additional that are applied when selecting this completion. Edits must not overlap with the main nor with themselves.

    property command

    command?: Command;
    • An optional Command that is executed *after* inserting this completion. *Note* that additional modifications to the current document should be described with the -property.

    property commitCharacters

    commitCharacters?: string[];
    • An optional set of characters that when pressed while this completion is active will accept it first and then type that character. *Note* that all commit characters should have length=1 and that superfluous characters will be ignored.

    property detail

    detail?: string;
    • A human-readable string with additional information about this item, like type or symbol information.

    property documentation

    documentation?: string | MarkdownString;
    • A human-readable string that represents a doc-comment.

    property filterText

    filterText?: string;
    • A string that should be used when filtering a set of completion items. When falsy the is used.

      Note that the filter text is matched against the leading word (prefix) which is defined by the -property.

    property insertText

    insertText?: string | SnippetString;
    • A string or snippet that should be inserted in a document when selecting this completion. When falsy the is used.

    property keepWhitespace

    keepWhitespace?: boolean;
    • Keep whitespace of the as is. By default, the editor adjusts leading whitespace of new lines so that they match the indentation of the line for which the item is accepted - setting this to true will prevent that.

    property kind

    kind?: CompletionItemKind;
    • The kind of this completion item. Based on the kind an icon is chosen by the editor.

    property label

    label: string | CompletionItemLabel;
    • The label of this completion item. By default this is also the text that is inserted when selecting this completion.

    property preselect

    preselect?: boolean;
    • Select this item when showing. *Note* that only one completion item can be selected and that the editor decides which item that is. The rule is that the *first* item of those that match best is selected.

    property range

    range?: Range | { inserting: Range; replacing: Range };
    • A range or a insert and replace range selecting the text that should be replaced by this completion item.

      When omitted, the range of the is used as replace-range and as insert-range the start of the to the current position is used.

      *Note 1:* A range must be a and it must the position at which completion has been . *Note 2:* A insert range must be a prefix of a replace range, that means it must be contained and starting at the same position.

    property sortText

    sortText?: string;
    • A string that should be used when comparing this item with other items. When falsy the is used.

      Note that sortText is only used for the initial ordering of completion items. When having a leading word (prefix) ordering is based on how well completions match that prefix and the initial ordering is only used when completions match equally well. The prefix is defined by the -property and can therefore be different for each completion.

    property tags

    tags?: readonly CompletionItemTag[];
    • Tags for this completion item.

    property textEdit

    textEdit?: TextEdit;
    • Deprecated

      Use CompletionItem.insertText and CompletionItem.range instead.

      An which is applied to a document when selecting this completion. When an edit is provided the value of is ignored.

      The Range of the edit must be single-line and on the same line completions were at.

    class CompletionList

    class CompletionList<T extends CompletionItem = CompletionItem> {}
    • Represents a collection of to be presented in the editor.

    constructor

    constructor(items?: T[], isIncomplete?: boolean);
    • Creates a new completion list.

      Parameter items

      The completion items.

      Parameter isIncomplete

      The list is not complete.

    property isIncomplete

    isIncomplete?: boolean;
    • This list is not complete. Further typing should result in recomputing this list.

    property items

    items: T[];
    • The completion items.

    class CustomExecution

    class CustomExecution {}
    • Class used to execute an extension callback as a task.

    constructor

    constructor(
    callback: (resolvedDefinition: TaskDefinition) => Thenable<Pseudoterminal>
    );
    • Constructs a CustomExecution task object. The callback will be executed when the task is run, at which point the extension should return the Pseudoterminal it will "run in". The task should wait to do further execution until Pseudoterminal.open is called. Task cancellation should be handled using Pseudoterminal.close. When the task is complete fire Pseudoterminal.onDidClose.

      Parameter callback

      The callback that will be called when the task is started by a user. Any ${} style variables that were in the task definition will be resolved and passed into the callback as resolvedDefinition.

    class DebugAdapterExecutable

    class DebugAdapterExecutable {}
    • Represents a debug adapter executable and optional arguments and runtime options passed to it.

    constructor

    constructor(
    command: string,
    args?: string[],
    options?: DebugAdapterExecutableOptions
    );
    • Creates a description for a debug adapter based on an executable program.

      Parameter command

      The command or executable path that implements the debug adapter.

      Parameter args

      Optional arguments to be passed to the command or executable.

      Parameter options

      Optional options to be used when starting the command or executable.

    property args

    readonly args: string[];
    • The arguments passed to the debug adapter executable. Defaults to an empty array.

    property command

    readonly command: string;
    • The command or path of the debug adapter executable. A command must be either an absolute path of an executable or the name of an command to be looked up via the PATH environment variable. The special value 'node' will be mapped to the editor's built-in Node.js runtime.

    property options

    readonly options?: DebugAdapterExecutableOptions;
    • Optional options to be used when the debug adapter is started. Defaults to undefined.

    class DebugAdapterInlineImplementation

    class DebugAdapterInlineImplementation {}
    • A debug adapter descriptor for an inline implementation.

    constructor

    constructor(implementation: DebugAdapter);
    • Create a descriptor for an inline implementation of a debug adapter.

    class DebugAdapterNamedPipeServer

    class DebugAdapterNamedPipeServer {}
    • Represents a debug adapter running as a Named Pipe (on Windows)/UNIX Domain Socket (on non-Windows) based server.

    constructor

    constructor(path: string);
    • Create a description for a debug adapter running as a Named Pipe (on Windows)/UNIX Domain Socket (on non-Windows) based server.

    property path

    readonly path: string;
    • The path to the NamedPipe/UNIX Domain Socket.

    class DebugAdapterServer

    class DebugAdapterServer {}
    • Represents a debug adapter running as a socket based server.

    constructor

    constructor(port: number, host?: string);
    • Create a description for a debug adapter running as a socket based server.

    property host

    readonly host?: string;
    • The host.

    property port

    readonly port: number;
    • The port.

    class Diagnostic

    class Diagnostic {}
    • Represents a diagnostic, such as a compiler error or warning. Diagnostic objects are only valid in the scope of a file.

    constructor

    constructor(range: Range, message: string, severity?: DiagnosticSeverity);
    • Creates a new diagnostic object.

      Parameter range

      The range to which this diagnostic applies.

      Parameter message

      The human-readable message.

      Parameter severity

      The severity, default is .

    property code

    code?: string | number | { value: string | number; target: Uri };
    • A code or identifier for this diagnostic. Should be used for later processing, e.g. when providing .

    property message

    message: string;
    • The human-readable message.

    property range

    range: Range;
    • The range to which this diagnostic applies.

    property relatedInformation

    relatedInformation?: DiagnosticRelatedInformation[];
    • An array of related diagnostic information, e.g. when symbol-names within a scope collide all definitions can be marked via this property.

    property severity

    severity: DiagnosticSeverity;
    • The severity, default is .

    property source

    source?: string;
    • A human-readable string describing the source of this diagnostic, e.g. 'typescript' or 'super lint'.

    property tags

    tags?: DiagnosticTag[];
    • Additional metadata about the diagnostic.

    class DiagnosticRelatedInformation

    class DiagnosticRelatedInformation {}
    • Represents a related message and source code location for a diagnostic. This should be used to point to code locations that cause or related to a diagnostics, e.g. when duplicating a symbol in a scope.

    constructor

    constructor(location: Location, message: string);
    • Creates a new related diagnostic information object.

      Parameter location

      The location.

      Parameter message

      The message.

    property location

    location: Location;
    • The location of this related diagnostic information.

    property message

    message: string;
    • The message of this related diagnostic information.

    class Disposable

    class Disposable {}
    • Represents a type which can release resources, such as event listening or a timer.

    constructor

    constructor(callOnDispose: Function);
    • Creates a new Disposable calling the provided function on dispose.

      Parameter callOnDispose

      Function that disposes something.

    method dispose

    dispose: () => any;
    • Dispose this object.

    method from

    static from: (...disposableLikes: { dispose: () => any }[]) => Disposable;
    • Combine many disposable-likes into one. Use this method when having objects with a dispose function which are not instances of Disposable.

      Parameter disposableLikes

      Objects that have at least a dispose-function member. Returns a new disposable which, upon dispose, will dispose all provided disposables.

    class DocumentHighlight

    class DocumentHighlight {}
    • A document highlight is a range inside a text document which deserves special attention. Usually a document highlight is visualized by changing the background color of its range.

    constructor

    constructor(range: Range, kind?: DocumentHighlightKind);
    • Creates a new document highlight object.

      Parameter range

      The range the highlight applies to.

      Parameter kind

      The highlight kind, default is .

    property kind

    kind?: DocumentHighlightKind;
    • The highlight kind, default is .

    property range

    range: Range;
    • The range this highlight applies to.

    class DocumentLink {}
    • A document link is a range in a text document that links to an internal or external resource, like another text document or a web site.

    constructor

    constructor(range: Range, target?: Uri);
    • Creates a new document link.

      Parameter range

      The range the document link applies to. Must not be empty.

      Parameter target

      The uri the document link points to.

    property range

    range: Range;
    • The range this link applies to.

    property target

    target?: Uri;
    • The uri this link points to.

    property tooltip

    tooltip?: string;
    • The tooltip text when you hover over this link.

      If a tooltip is provided, is will be displayed in a string that includes instructions on how to trigger the link, such as {0} (ctrl + click). The specific instructions vary depending on OS, user settings, and localization.

    class DocumentSymbol

    class DocumentSymbol {}
    • Represents programming constructs like variables, classes, interfaces etc. that appear in a document. Document symbols can be hierarchical and they have two ranges: one that encloses its definition and one that points to its most interesting range, e.g. the range of an identifier.

    constructor

    constructor(
    name: string,
    detail: string,
    kind: SymbolKind,
    range: Range,
    selectionRange: Range
    );
    • Creates a new document symbol.

      Parameter name

      The name of the symbol.

      Parameter detail

      Details for the symbol.

      Parameter kind

      The kind of the symbol.

      Parameter range

      The full range of the symbol.

      Parameter selectionRange

      The range that should be reveal.

    property children

    children: DocumentSymbol[];
    • Children of this symbol, e.g. properties of a class.

    property detail

    detail: string;
    • More detail for this symbol, e.g. the signature of a function.

    property kind

    kind: SymbolKind;
    • The kind of this symbol.

    property name

    name: string;
    • The name of this symbol.

    property range

    range: Range;
    • The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g. comments and code.

    property selectionRange

    selectionRange: Range;
    • The range that should be selected and reveal when this symbol is being picked, e.g. the name of a function. Must be contained by the .

    property tags

    tags?: readonly SymbolTag[];
    • Tags for this symbol.

    class EvaluatableExpression

    class EvaluatableExpression {}
    • An EvaluatableExpression represents an expression in a document that can be evaluated by an active debugger or runtime. The result of this evaluation is shown in a tooltip-like widget. If only a range is specified, the expression will be extracted from the underlying document. An optional expression can be used to override the extracted expression. In this case the range is still used to highlight the range in the document.

    constructor

    constructor(range: Range, expression?: string);
    • Creates a new evaluatable expression object.

      Parameter range

      The range in the underlying document from which the evaluatable expression is extracted.

      Parameter expression

      If specified overrides the extracted expression.

    property expression

    readonly expression?: string;

      property range

      readonly range: Range;

        class EventEmitter

        class EventEmitter<T> {}
        • An event emitter can be used to create and manage an Event for others to subscribe to. One emitter always owns one event.

          Use this class if you want to provide event from within your extension, for instance inside a TextDocumentContentProvider or when providing API to other extensions.

        property event

        event: Event<T>;
        • The event listeners can subscribe to.

        method dispose

        dispose: () => void;
        • Dispose this object and free resources.

        method fire

        fire: (data: T) => void;
        • Notify all subscribers of the . Failure of one or more listener will not fail this function call.

          Parameter data

          The event object.

        class FileDecoration

        class FileDecoration {}
        • A file decoration represents metadata that can be rendered with a file.

        constructor

        constructor(badge?: string, tooltip?: string, color?: ThemeColor);
        • Creates a new decoration.

          Parameter badge

          A letter that represents the decoration.

          Parameter tooltip

          The tooltip of the decoration.

          Parameter color

          The color of the decoration.

        property badge

        badge?: string;
        • A very short string that represents this decoration.

        property color

        color?: ThemeColor;
        • The color of this decoration.

        property propagate

        propagate?: boolean;
        • A flag expressing that this decoration should be propagated to its parents.

        property tooltip

        tooltip?: string;
        • A human-readable tooltip for this decoration.

        class FileSystemError

        class FileSystemError extends Error {}
        • A type that filesystem providers should use to signal errors.

          This class has factory methods for common error-cases, like FileNotFound when a file or folder doesn't exist, use them like so: throw vscode.FileSystemError.FileNotFound(someUri);

        constructor

        constructor(messageOrUri?: string | Uri);
        • Creates a new filesystem error.

          Parameter messageOrUri

          Message or uri.

        property code

        readonly code: string;
        • A code that identifies this error.

          Possible values are names of errors, like , or Unknown for unspecified errors.

        method FileExists

        static FileExists: (messageOrUri?: string | Uri) => FileSystemError;
        • Create an error to signal that a file or folder already exists, e.g. when creating but not overwriting a file.

          Parameter messageOrUri

          Message or uri.

        method FileIsADirectory

        static FileIsADirectory: (messageOrUri?: string | Uri) => FileSystemError;
        • Create an error to signal that a file is a folder.

          Parameter messageOrUri

          Message or uri.

        method FileNotADirectory

        static FileNotADirectory: (messageOrUri?: string | Uri) => FileSystemError;
        • Create an error to signal that a file is not a folder.

          Parameter messageOrUri

          Message or uri.

        method FileNotFound

        static FileNotFound: (messageOrUri?: string | Uri) => FileSystemError;
        • Create an error to signal that a file or folder wasn't found.

          Parameter messageOrUri

          Message or uri.

        method NoPermissions

        static NoPermissions: (messageOrUri?: string | Uri) => FileSystemError;
        • Create an error to signal that an operation lacks required permissions.

          Parameter messageOrUri

          Message or uri.

        method Unavailable

        static Unavailable: (messageOrUri?: string | Uri) => FileSystemError;
        • Create an error to signal that the file system is unavailable or too busy to complete a request.

          Parameter messageOrUri

          Message or uri.

        class FoldingRange

        class FoldingRange {}
        • A line based folding range. To be valid, start and end line must be bigger than zero and smaller than the number of lines in the document. Invalid ranges will be ignored.

        constructor

        constructor(start: number, end: number, kind?: FoldingRangeKind);
        • Creates a new folding range.

          Parameter start

          The start line of the folded range.

          Parameter end

          The end line of the folded range.

          Parameter kind

          The kind of the folding range.

        property end

        end: number;
        • The zero-based end line of the range to fold. The folded area ends with the line's last character. To be valid, the end must be zero or larger and smaller than the number of lines in the document.

        property kind

        kind?: FoldingRangeKind;
        • Describes the of the folding range such as or . The kind is used to categorize folding ranges and used by commands like 'Fold all comments'. See FoldingRangeKind for an enumeration of all kinds. If not set, the range is originated from a syntax element.

        property start

        start: number;
        • The zero-based start line of the range to fold. The folded area starts after the line's last character. To be valid, the end must be zero or larger and smaller than the number of lines in the document.

        class FunctionBreakpoint

        class FunctionBreakpoint extends Breakpoint {}
        • A breakpoint specified by a function name.

        constructor

        constructor(
        functionName: string,
        enabled?: boolean,
        condition?: string,
        hitCondition?: string,
        logMessage?: string
        );
        • Create a new function breakpoint.

        property functionName

        readonly functionName: string;
        • The name of the function to which this breakpoint is attached.

        class Hover

        class Hover {}
        • A hover represents additional information for a symbol or word. Hovers are rendered in a tooltip-like widget.

        constructor

        constructor(
        contents: MarkdownString | MarkedString | (MarkdownString | MarkedString)[],
        range?: Range
        );
        • Creates a new hover object.

          Parameter contents

          The contents of the hover.

          Parameter range

          The range to which the hover applies.

        property contents

        contents: (MarkdownString | MarkedString)[];
        • The contents of this hover.

        property range

        range?: Range;
        • The range to which this hover applies. When missing, the editor will use the range at the current position or the current position itself.

        class InlineValueEvaluatableExpression

        class InlineValueEvaluatableExpression {}
        • Provide an inline value through an expression evaluation. If only a range is specified, the expression will be extracted from the underlying document. An optional expression can be used to override the extracted expression.

        constructor

        constructor(range: Range, expression?: string);
        • Creates a new InlineValueEvaluatableExpression object.

          Parameter range

          The range in the underlying document from which the evaluatable expression is extracted.

          Parameter expression

          If specified overrides the extracted expression.

        property expression

        readonly expression?: string;
        • If specified the expression overrides the extracted expression.

        property range

        readonly range: Range;
        • The document range for which the inline value applies. The range is used to extract the evaluatable expression from the underlying document.

        class InlineValueText

        class InlineValueText {}
        • Provide inline value as text.

        constructor

        constructor(range: Range, text: string);
        • Creates a new InlineValueText object.

          Parameter range

          The document line where to show the inline value.

          Parameter text

          The value to be shown for the line.

        property range

        readonly range: Range;
        • The document range for which the inline value applies.

        property text

        readonly text: string;
        • The text of the inline value.

        class InlineValueVariableLookup

        class InlineValueVariableLookup {}
        • Provide inline value through a variable lookup. If only a range is specified, the variable name will be extracted from the underlying document. An optional variable name can be used to override the extracted name.

        constructor

        constructor(range: Range, variableName?: string, caseSensitiveLookup?: boolean);
        • Creates a new InlineValueVariableLookup object.

          Parameter range

          The document line where to show the inline value.

          Parameter variableName

          The name of the variable to look up.

          Parameter caseSensitiveLookup

          How to perform the lookup. If missing lookup is case sensitive.

        property caseSensitiveLookup

        readonly caseSensitiveLookup: boolean;
        • How to perform the lookup.

        property range

        readonly range: Range;
        • The document range for which the inline value applies. The range is used to extract the variable name from the underlying document.

        property variableName

        readonly variableName?: string;
        • If specified the name of the variable to look up.

        class LinkedEditingRanges

        class LinkedEditingRanges {}
        • Represents a list of ranges that can be edited together along with a word pattern to describe valid range contents.

        constructor

        constructor(ranges: Range[], wordPattern?: RegExp);
        • Create a new linked editing ranges object.

          Parameter ranges

          A list of ranges that can be edited together

          Parameter wordPattern

          An optional word pattern that describes valid contents for the given ranges

        property ranges

        readonly ranges: Range[];
        • A list of ranges that can be edited together. The ranges must have identical length and text content. The ranges cannot overlap.

        property wordPattern

        readonly wordPattern?: RegExp;
        • An optional word pattern that describes valid contents for the given ranges. If no pattern is provided, the language configuration's word pattern will be used.

        class Location

        class Location {}
        • Represents a location inside a resource, such as a line inside a text file.

        constructor

        constructor(uri: Uri, rangeOrPosition: Range | Position);
        • Creates a new location object.

          Parameter uri

          The resource identifier.

          Parameter rangeOrPosition

          The range or position. Positions will be converted to an empty range.

        property range

        range: Range;
        • The document range of this location.

        property uri

        uri: Uri;
        • The resource identifier of this location.

        class MarkdownString

        class MarkdownString {}
        • The MarkdownString represents human-readable text that supports formatting via the markdown syntax. Standard markdown is supported, also tables, but no embedded html.

          Rendering of via the $(<name>)-syntax is supported when the is set to true.

        constructor

        constructor(value?: string, supportThemeIcons?: boolean);
        • Creates a new markdown string with the given value.

          Parameter value

          Optional, initial value.

          Parameter supportThemeIcons

          Optional, Specifies whether are supported within the .

        property isTrusted

        isTrusted?: boolean;
        • Indicates that this markdown string is from a trusted source. Only *trusted* markdown supports links that execute commands, e.g. [Run it](command:myCommandId).

        property supportThemeIcons

        supportThemeIcons?: boolean;
        • Indicates that this markdown string can contain , e.g. $(zap).

        property value

        value: string;
        • The markdown string.

        method appendCodeblock

        appendCodeblock: (value: string, language?: string) => MarkdownString;
        • Appends the given string as codeblock using the provided language.

          Parameter value

          A code snippet.

          Parameter language

          An optional .

        method appendMarkdown

        appendMarkdown: (value: string) => MarkdownString;
        • Appends the given string 'as is' to this markdown string. When is true, in the value will be iconified.

          Parameter value

          Markdown string.

        method appendText

        appendText: (value: string) => MarkdownString;
        • Appends and escapes the given string to this markdown string.

          Parameter value

          Plain text.

        class NotebookCellData

        class NotebookCellData {}
        • NotebookCellData is the raw representation of notebook cells. Its is part of .

        constructor

        constructor(kind: NotebookCellKind, value: string, languageId: string);
        • Create new cell data. Minimal cell data specifies its kind, its source value, and the language identifier of its source.

          Parameter kind

          The kind.

          Parameter value

          The source value.

          Parameter languageId

          The language identifier of the source value.

        property executionSummary

        executionSummary?: NotebookCellExecutionSummary;
        • The execution summary of this cell data.

        property kind

        kind: NotebookCellKind;
        • The of this cell data.

        property languageId

        languageId: string;
        • The language identifier of the source value of this cell data. Any value from is possible.

        property metadata

        metadata?: { [key: string]: any };
        • Arbitrary metadata of this cell data. Can be anything but must be JSON-stringifyable.

        property outputs

        outputs?: NotebookCellOutput[];
        • The outputs of this cell data.

        property value

        value: string;
        • The source value of this cell data - either source code or formatted text.

        class NotebookCellOutput

        class NotebookCellOutput {}
        • Notebook cell output represents a result of executing a cell. It is a container type for multiple where contained items represent the same result but use different MIME types.

        constructor

        constructor(items: NotebookCellOutputItem[], metadata?: { [key: string]: any });
        • Create new notebook output.

          Parameter items

          Notebook output items.

          Parameter metadata

          Optional metadata.

        property items

        items: NotebookCellOutputItem[];
        • The output items of this output. Each item must represent the same result. _Note_ that repeated MIME types per output is invalid and that the editor will just pick one of them.

          new vscode.NotebookCellOutput([
          vscode.NotebookCellOutputItem.text('Hello', 'text/plain'),
          vscode.NotebookCellOutputItem.text('<i>Hello</i>', 'text/html'),
          vscode.NotebookCellOutputItem.text('_Hello_', 'text/markdown'),
          vscode.NotebookCellOutputItem.text('Hey', 'text/plain'), // INVALID: repeated type, editor will pick just one
          ])

        property metadata

        metadata?: { [key: string]: any };
        • Arbitrary metadata for this cell output. Can be anything but must be JSON-stringifyable.

        class NotebookCellOutputItem

        class NotebookCellOutputItem {}
        • One representation of a , defined by MIME type and data.

        constructor

        constructor(data: Uint8Array, mime: string);
        • Create a new notebook cell output item.

          Parameter data

          The value of the output item.

          Parameter mime

          The mime type of the output item.

        property data

        data: Uint8Array;
        • The data of this output item. Must always be an array of unsigned 8-bit integers.

        property mime

        mime: string;
        • The mime type which determines how the -property is interpreted.

          Notebooks have built-in support for certain mime-types, extensions can add support for new types and override existing types.

        method error

        static error: (value: Error) => NotebookCellOutputItem;
        • Factory function to create a NotebookCellOutputItem that uses uses the application/vnd.code.notebook.error mime type.

          Parameter value

          An error object.

          Returns

          A new output item object.

        method json

        static json: (value: any, mime?: string) => NotebookCellOutputItem;
        • Factory function to create a NotebookCellOutputItem from a JSON object.

          *Note* that this function is not expecting "stringified JSON" but an object that can be stringified. This function will throw an error when the passed value cannot be JSON-stringified.

          Parameter value

          A JSON-stringifyable value.

          Parameter mime

          Optional MIME type, defaults to application/json

          Returns

          A new output item object.

        method stderr

        static stderr: (value: string) => NotebookCellOutputItem;
        • Factory function to create a NotebookCellOutputItem that uses uses the application/vnd.code.notebook.stderr mime type.

          Parameter value

          A string.

          Returns

          A new output item object.

        method stdout

        static stdout: (value: string) => NotebookCellOutputItem;
        • Factory function to create a NotebookCellOutputItem that uses uses the application/vnd.code.notebook.stdout mime type.

          Parameter value

          A string.

          Returns

          A new output item object.

        method text

        static text: (value: string, mime?: string) => NotebookCellOutputItem;
        • Factory function to create a NotebookCellOutputItem from a string.

          *Note* that an UTF-8 encoder is used to create bytes for the string.

          Parameter value

          A string.

          Parameter mime

          Optional MIME type, defaults to text/plain.

          Returns

          A new output item object.

        class NotebookCellStatusBarItem

        class NotebookCellStatusBarItem {}
        • A contribution to a cell's status bar

        constructor

        constructor(text: string, alignment: NotebookCellStatusBarAlignment);
        • Creates a new NotebookCellStatusBarItem.

          Parameter text

          The text to show for the item.

          Parameter alignment

          Whether the item is aligned to the left or right.

        property accessibilityInformation

        accessibilityInformation?: AccessibilityInformation;
        • Accessibility information used when a screen reader interacts with this item.

        property alignment

        alignment: NotebookCellStatusBarAlignment;
        • Whether the item is aligned to the left or right.

        property command

        command?: string | Command;
        • An optional or identifier of a command to run on click.

          The command must be .

          Note that if this is a object, only the and are used by the editor.

        property priority

        priority?: number;
        • The priority of the item. A higher value item will be shown more to the left.

        property text

        text: string;
        • The text to show for the item.

        property tooltip

        tooltip?: string;
        • A tooltip to show when the item is hovered.

        class NotebookData

        class NotebookData {}
        • Raw representation of a notebook.

          Extensions are responsible for creating so that the editor can create a .

          See Also

        constructor

        constructor(cells: NotebookCellData[]);
        • Create new notebook data.

          Parameter cells

          An array of cell data.

        property cells

        cells: NotebookCellData[];
        • The cell data of this notebook data.

        property metadata

        metadata?: { [key: string]: any };
        • Arbitrary metadata of notebook data.

        class NotebookRange

        class NotebookRange {}
        • A notebook range represents an ordered pair of two cell indices. It is guaranteed that start is less than or equal to end.

        constructor

        constructor(start: number, end: number);
        • Create a new notebook range. If start is not before or equal to end, the values will be swapped.

          Parameter start

          start index

          Parameter end

          end index.

        property end

        readonly end: number;
        • The exclusive end index of this range (zero-based).

        property isEmpty

        readonly isEmpty: boolean;
        • true if start and end are equal.

        property start

        readonly start: number;
        • The zero-based start index of this range.

        method with

        with: (change: { start?: number; end?: number }) => NotebookRange;
        • Derive a new range for this range.

          Parameter change

          An object that describes a change to this range. A range that reflects the given change. Will return this range if the change is not changing anything.

        class ParameterInformation

        class ParameterInformation {}
        • Represents a parameter of a callable-signature. A parameter can have a label and a doc-comment.

        constructor

        constructor(
        label: string | [number, number],
        documentation?: string | MarkdownString
        );
        • Creates a new parameter information object.

          Parameter label

          A label string or inclusive start and exclusive end offsets within its containing signature label.

          Parameter documentation

          A doc string.

        property documentation

        documentation?: string | MarkdownString;
        • The human-readable doc-comment of this signature. Will be shown in the UI but can be omitted.

        property label

        label: string | [number, number];
        • The label of this signature.

          Either a string or inclusive start and exclusive end offsets within its containing . *Note*: A label of type string must be a substring of its containing signature information's .

        class Position

        class Position {}
        • Represents a line and character position, such as the position of the cursor.

          Position objects are __immutable__. Use the or methods to derive new positions from an existing position.

        constructor

        constructor(line: number, character: number);
        • Parameter line

          A zero-based line value.

          Parameter character

          A zero-based character value.

        property character

        readonly character: number;
        • The zero-based character value.

        property line

        readonly line: number;
        • The zero-based line value.

        method compareTo

        compareTo: (other: Position) => number;
        • Compare this to other.

          Parameter other

          A position. A number smaller than zero if this position is before the given position, a number greater than zero if this position is after the given position, or zero when this and the given position are equal.

        method isAfter

        isAfter: (other: Position) => boolean;
        • Check if this position is after other.

          Parameter other

          A position. true if position is on a greater line or on the same line on a greater character.

        method isAfterOrEqual

        isAfterOrEqual: (other: Position) => boolean;
        • Check if this position is after or equal to other.

          Parameter other

          A position. true if position is on a greater line or on the same line on a greater or equal character.

        method isBefore

        isBefore: (other: Position) => boolean;
        • Check if this position is before other.

          Parameter other

          A position. true if position is on a smaller line or on the same line on a smaller character.

        method isBeforeOrEqual

        isBeforeOrEqual: (other: Position) => boolean;
        • Check if this position is before or equal to other.

          Parameter other

          A position. true if position is on a smaller line or on the same line on a smaller or equal character.

        method isEqual

        isEqual: (other: Position) => boolean;
        • Check if this position is equal to other.

          Parameter other

          A position. true if the line and character of the given position are equal to the line and character of this position.

        method translate

        translate: {
        (lineDelta?: number, characterDelta?: number): Position;
        (change: { lineDelta?: number; characterDelta?: number }): Position;
        };
        • Create a new position relative to this position.

          Parameter lineDelta

          Delta value for the line value, default is 0.

          Parameter characterDelta

          Delta value for the character value, default is 0. A position which line and character is the sum of the current line and character and the corresponding deltas.

        • Derived a new position relative to this position.

          Parameter change

          An object that describes a delta to this position. A position that reflects the given delta. Will return this position if the change is not changing anything.

        method with

        with: {
        (line?: number, character?: number): Position;
        (change: { line?: number; character?: number }): Position;
        };
        • Create a new position derived from this position.

          Parameter line

          Value that should be used as line value, default is the

          Parameter character

          Value that should be used as character value, default is the A position where line and character are replaced by the given values.

        • Derived a new position from this position.

          Parameter change

          An object that describes a change to this position. A position that reflects the given change. Will return this position if the change is not changing anything.

        class ProcessExecution

        class ProcessExecution {}
        • The execution of a task happens as an external process without shell interaction.

        constructor

        constructor(process: string, options?: ProcessExecutionOptions);
        • Creates a process execution.

          Parameter process

          The process to start.

          Parameter options

          Optional options for the started process.

        constructor

        constructor(process: string, args: string[], options?: ProcessExecutionOptions);
        • Creates a process execution.

          Parameter process

          The process to start.

          Parameter args

          Arguments to be passed to the process.

          Parameter options

          Optional options for the started process.

        property args

        args: string[];
        • The arguments passed to the process. Defaults to an empty array.

        property options

        options?: ProcessExecutionOptions;
        • The process options used when the process is executed. Defaults to undefined.

        property process

        process: string;
        • The process to be executed.

        class QuickInputButtons

        class QuickInputButtons {}

        property Back

        static readonly Back: QuickInputButton;
        • A back button for QuickPick and InputBox.

          When a navigation 'back' button is needed this one should be used for consistency. It comes with a predefined icon, tooltip and location.

        class Range

        class Range {}
        • A range represents an ordered pair of two positions. It is guaranteed that .isBeforeOrEqual()

          Range objects are __immutable__. Use the , , or methods to derive new ranges from an existing range.

        constructor

        constructor(start: Position, end: Position);
        • Create a new range from two positions. If start is not before or equal to end, the values will be swapped.

          Parameter start

          A position.

          Parameter end

          A position.

        constructor

        constructor(
        startLine: number,
        startCharacter: number,
        endLine: number,
        endCharacter: number
        );
        • Create a new range from number coordinates. It is a shorter equivalent of using new Range(new Position(startLine, startCharacter), new Position(endLine, endCharacter))

          Parameter startLine

          A zero-based line value.

          Parameter startCharacter

          A zero-based character value.

          Parameter endLine

          A zero-based line value.

          Parameter endCharacter

          A zero-based character value.

        property end

        readonly end: Position;
        • The end position. It is after or equal to .

        property isEmpty

        isEmpty: boolean;
        • true if start and end are equal.

        property isSingleLine

        isSingleLine: boolean;
        • true if start.line and end.line are equal.

        property start

        readonly start: Position;
        • The start position. It is before or equal to .

        method contains

        contains: (positionOrRange: Position | Range) => boolean;
        • Check if a position or a range is contained in this range.

          Parameter positionOrRange

          A position or a range. true if the position or range is inside or equal to this range.

        method intersection

        intersection: (range: Range) => Range | undefined;
        • Intersect range with this range and returns a new range or undefined if the ranges have no overlap.

          Parameter range

          A range. A range of the greater start and smaller end positions. Will return undefined when there is no overlap.

        method isEqual

        isEqual: (other: Range) => boolean;
        • Check if other equals this range.

          Parameter other

          A range. true when start and end are to start and end of this range.

        method union

        union: (other: Range) => Range;
        • Compute the union of other with this range.

          Parameter other

          A range. A range of smaller start position and the greater end position.

        method with

        with: {
        (start?: Position, end?: Position): Range;
        (change: { start?: Position; end?: Position }): Range;
        };
        • Derived a new range from this range.

          Parameter start

          A position that should be used as start. The default value is the .

          Parameter end

          A position that should be used as end. The default value is the . A range derived from this range with the given start and end position. If start and end are not different this range will be returned.

        • Derived a new range from this range.

          Parameter change

          An object that describes a change to this range. A range that reflects the given change. Will return this range if the change is not changing anything.

        class RelativePattern

        class RelativePattern {}
        • A relative pattern is a helper to construct glob patterns that are matched relatively to a base file path. The base path can either be an absolute file path as string or uri or a , which is the preferred way of creating the relative pattern.

        constructor

        constructor(base: string | Uri | WorkspaceFolder, pattern: string);
        • Creates a new relative pattern object with a base file path and pattern to match. This pattern will be matched on file paths relative to the base.

          Example:

          const folder = vscode.workspace.workspaceFolders?.[0];
          if (folder) {
          // Match any TypeScript file in the root of this workspace folder
          const pattern1 = new vscode.RelativePattern(folder, '*.ts');
          // Match any TypeScript file in `someFolder` inside this workspace folder
          const pattern2 = new vscode.RelativePattern(folder, 'someFolder/*.ts');
          }

          Parameter base

          A base to which this pattern will be matched against relatively. It is recommended to pass in a if the pattern should match inside the workspace. Otherwise, a uri or string should only be used if the pattern is for a file path outside the workspace.

          Parameter pattern

          A file glob pattern like *.{ts,js} that will be matched on paths relative to the base.

        property base

        base: string;
        • A base file path to which this pattern will be matched against relatively.

        property pattern

        pattern: string;
        • A file glob pattern like *.{ts,js} that will be matched on file paths relative to the base path.

          Example: Given a base of /home/work/folder and a file path of /home/work/folder/index.js, the file glob pattern will match on index.js.

        class Selection

        class Selection extends Range {}
        • Represents a text selection in an editor.

        constructor

        constructor(anchor: Position, active: Position);
        • Create a selection from two positions.

          Parameter anchor

          A position.

          Parameter active

          A position.

        constructor

        constructor(
        anchorLine: number,
        anchorCharacter: number,
        activeLine: number,
        activeCharacter: number
        );
        • Create a selection from four coordinates.

          Parameter anchorLine

          A zero-based line value.

          Parameter anchorCharacter

          A zero-based character value.

          Parameter activeLine

          A zero-based line value.

          Parameter activeCharacter

          A zero-based character value.

        property active

        active: Position;
        • The position of the cursor. This position might be before or after .

        property anchor

        anchor: Position;
        • The position at which the selection starts. This position might be before or after .

        property isReversed

        isReversed: boolean;
        • A selection is reversed if .isBefore().

        class SelectionRange

        class SelectionRange {}
        • A selection range represents a part of a selection hierarchy. A selection range may have a parent selection range that contains it.

        constructor

        constructor(range: Range, parent?: SelectionRange);
        • Creates a new selection range.

          Parameter range

          The range of the selection range.

          Parameter parent

          The parent of the selection range.

        property parent

        parent?: SelectionRange;
        • The parent selection range containing this range.

        property range

        range: Range;
        • The Range of this selection range.

        class SemanticTokens

        class SemanticTokens {}
        • Represents semantic tokens, either in a range or in an entire document.

          See Also

        constructor

        constructor(data: Uint32Array, resultId?: string);

          property data

          readonly data: Uint32Array;
          • The actual tokens data.

            See Also

            • for an explanation of the format.

          property resultId

          readonly resultId?: string;
          • The result id of the tokens.

            This is the id that will be passed to DocumentSemanticTokensProvider.provideDocumentSemanticTokensEdits (if implemented).

          class SemanticTokensBuilder

          class SemanticTokensBuilder {}
          • A semantic tokens builder can help with creating a SemanticTokens instance which contains delta encoded semantic tokens.

          constructor

          constructor(legend?: SemanticTokensLegend);

            method build

            build: (resultId?: string) => SemanticTokens;
            • Finish and create a SemanticTokens instance.

            method push

            push: {
            (
            line: number,
            char: number,
            length: number,
            tokenType: number,
            tokenModifiers?: number
            ): void;
            (range: Range, tokenType: string, tokenModifiers?: string[]): void;
            };
            • Add another token.

              Parameter line

              The token start line number (absolute value).

              Parameter char

              The token start character (absolute value).

              Parameter length

              The token length in characters.

              Parameter tokenType

              The encoded token type.

              Parameter tokenModifiers

              The encoded token modifiers.

            • Add another token. Use only when providing a legend.

              Parameter range

              The range of the token. Must be single-line.

              Parameter tokenType

              The token type.

              Parameter tokenModifiers

              The token modifiers.

            class SemanticTokensEdit

            class SemanticTokensEdit {}
            • Represents an edit to semantic tokens.

              See Also

              • for an explanation of the format.

            constructor

            constructor(start: number, deleteCount: number, data?: Uint32Array);

              property data

              readonly data?: Uint32Array;
              • The elements to insert.

              property deleteCount

              readonly deleteCount: number;
              • The count of elements to remove.

              property start

              readonly start: number;
              • The start offset of the edit.

              class SemanticTokensEdits

              class SemanticTokensEdits {}
              • Represents edits to semantic tokens.

                See Also

                • for an explanation of the format.

              constructor

              constructor(edits: SemanticTokensEdit[], resultId?: string);

                property edits

                readonly edits: SemanticTokensEdit[];
                • The edits to the tokens data. All edits refer to the initial data state.

                property resultId

                readonly resultId?: string;
                • The result id of the tokens.

                  This is the id that will be passed to DocumentSemanticTokensProvider.provideDocumentSemanticTokensEdits (if implemented).

                class SemanticTokensLegend

                class SemanticTokensLegend {}
                • A semantic tokens legend contains the needed information to decipher the integer encoded representation of semantic tokens.

                constructor

                constructor(tokenTypes: string[], tokenModifiers?: string[]);

                  property tokenModifiers

                  readonly tokenModifiers: string[];
                  • The possible token modifiers.

                  property tokenTypes

                  readonly tokenTypes: string[];
                  • The possible token types.

                  class ShellExecution

                  class ShellExecution {}

                    constructor

                    constructor(commandLine: string, options?: ShellExecutionOptions);
                    • Creates a shell execution with a full command line.

                      Parameter commandLine

                      The command line to execute.

                      Parameter options

                      Optional options for the started the shell.

                    constructor

                    constructor(
                    command: string | ShellQuotedString,
                    args: (string | ShellQuotedString)[],
                    options?: ShellExecutionOptions
                    );
                    • Creates a shell execution with a command and arguments. For the real execution the editor will construct a command line from the command and the arguments. This is subject to interpretation especially when it comes to quoting. If full control over the command line is needed please use the constructor that creates a ShellExecution with the full command line.

                      Parameter command

                      The command to execute.

                      Parameter args

                      The command arguments.

                      Parameter options

                      Optional options for the started the shell.

                    property args

                    args: (string | ShellQuotedString)[];
                    • The shell args. Is undefined if created with a full command line.

                    property command

                    command: string | ShellQuotedString;
                    • The shell command. Is undefined if created with a full command line.

                    property commandLine

                    commandLine: string;
                    • The shell command line. Is undefined if created with a command and arguments.

                    property options

                    options?: ShellExecutionOptions;
                    • The shell options used when the command line is executed in a shell. Defaults to undefined.

                    class SignatureHelp

                    class SignatureHelp {}
                    • Signature help represents the signature of something callable. There can be multiple signatures but only one active and only one active parameter.

                    property activeParameter

                    activeParameter: number;
                    • The active parameter of the active signature.

                    property activeSignature

                    activeSignature: number;
                    • The active signature.

                    property signatures

                    signatures: SignatureInformation[];
                    • One or more signatures.

                    class SignatureInformation

                    class SignatureInformation {}
                    • Represents the signature of something callable. A signature can have a label, like a function-name, a doc-comment, and a set of parameters.

                    constructor

                    constructor(label: string, documentation?: string | MarkdownString);
                    • Creates a new signature information object.

                      Parameter label

                      A label string.

                      Parameter documentation

                      A doc string.

                    property activeParameter

                    activeParameter?: number;
                    • The index of the active parameter.

                      If provided, this is used in place of .

                    property documentation

                    documentation?: string | MarkdownString;
                    • The human-readable doc-comment of this signature. Will be shown in the UI but can be omitted.

                    property label

                    label: string;
                    • The label of this signature. Will be shown in the UI.

                    property parameters

                    parameters: ParameterInformation[];
                    • The parameters of this signature.

                    class SnippetString

                    class SnippetString {}
                    • A snippet string is a template which allows to insert text and to control the editor cursor when insertion happens.

                      A snippet can define tab stops and placeholders with $1, $2 and ${3:foo}. $0 defines the final tab stop, it defaults to the end of the snippet. Variables are defined with $name and ${name:default value}. The full snippet syntax is documented [here](https://code.visualstudio.com/docs/editor/userdefinedsnippets#_creating-your-own-snippets).

                    constructor

                    constructor(value?: string);

                      property value

                      value: string;
                      • The snippet string.

                      method appendChoice

                      appendChoice: (values: string[], number?: number) => SnippetString;
                      • Builder-function that appends a choice (${1|a,b,c|}) to the of this snippet string.

                        Parameter values

                        The values for choices - the array of strings

                        Parameter number

                        The number of this tabstop, defaults to an auto-increment value starting at 1. This snippet string.

                      method appendPlaceholder

                      appendPlaceholder: (
                      value: string | ((snippet: SnippetString) => any),
                      number?: number
                      ) => SnippetString;
                      • Builder-function that appends a placeholder (${1:value}) to the of this snippet string.

                        Parameter value

                        The value of this placeholder - either a string or a function with which a nested snippet can be created.

                        Parameter number

                        The number of this tabstop, defaults to an auto-increment value starting at 1. This snippet string.

                      method appendTabstop

                      appendTabstop: (number?: number) => SnippetString;
                      • Builder-function that appends a tabstop ($1, $2 etc) to the of this snippet string.

                        Parameter number

                        The number of this tabstop, defaults to an auto-increment value starting at 1. This snippet string.

                      method appendText

                      appendText: (string: string) => SnippetString;
                      • Builder-function that appends the given string to the of this snippet string.

                        Parameter string

                        A value to append 'as given'. The string will be escaped. This snippet string.

                      method appendVariable

                      appendVariable: (
                      name: string,
                      defaultValue: string | ((snippet: SnippetString) => any)
                      ) => SnippetString;
                      • Builder-function that appends a variable (${VAR}) to the of this snippet string.

                        Parameter name

                        The name of the variable - excluding the $.

                        Parameter defaultValue

                        The default value which is used when the variable name cannot be resolved - either a string or a function with which a nested snippet can be created. This snippet string.

                      class SourceBreakpoint

                      class SourceBreakpoint extends Breakpoint {}
                      • A breakpoint specified by a source location.

                      constructor

                      constructor(
                      location: Location,
                      enabled?: boolean,
                      condition?: string,
                      hitCondition?: string,
                      logMessage?: string
                      );
                      • Create a new breakpoint for a source location.

                      property location

                      readonly location: Location;
                      • The source and line position of this breakpoint.

                      class SymbolInformation

                      class SymbolInformation {}
                      • Represents information about programming constructs like variables, classes, interfaces etc.

                      constructor

                      constructor(
                      name: string,
                      kind: SymbolKind,
                      containerName: string,
                      location: Location
                      );
                      • Creates a new symbol information object.

                        Parameter name

                        The name of the symbol.

                        Parameter kind

                        The kind of the symbol.

                        Parameter containerName

                        The name of the symbol containing the symbol.

                        Parameter location

                        The location of the symbol.

                      constructor

                      constructor(
                      name: string,
                      kind: SymbolKind,
                      range: Range,
                      uri?: Uri,
                      containerName?: string
                      );
                      • Creates a new symbol information object.

                        Parameter name

                        The name of the symbol.

                        Parameter kind

                        The kind of the symbol.

                        Parameter range

                        The range of the location of the symbol.

                        Parameter uri

                        The resource of the location of symbol, defaults to the current document.

                        Parameter containerName

                        The name of the symbol containing the symbol.

                        Deprecated

                        Please use the constructor taking a Location object.

                      property containerName

                      containerName: string;
                      • The name of the symbol containing this symbol.

                      property kind

                      kind: SymbolKind;
                      • The kind of this symbol.

                      property location

                      location: Location;
                      • The location of this symbol.

                      property name

                      name: string;
                      • The name of this symbol.

                      property tags

                      tags?: readonly SymbolTag[];
                      • Tags for this symbol.

                      class Task

                      class Task {}
                      • A task to execute

                      constructor

                      constructor(
                      taskDefinition: TaskDefinition,
                      scope: WorkspaceFolder | TaskScope,
                      name: string,
                      source: string,
                      execution?: ProcessExecution | ShellExecution | CustomExecution,
                      problemMatchers?: string | string[]
                      );
                      • Creates a new task.

                        Parameter definition

                        The task definition as defined in the taskDefinitions extension point.

                        Parameter scope

                        Specifies the task's scope. It is either a global or a workspace task or a task for a specific workspace folder. Global tasks are currently not supported.

                        Parameter name

                        The task's name. Is presented in the user interface.

                        Parameter source

                        The task's source (e.g. 'gulp', 'npm', ...). Is presented in the user interface.

                        Parameter execution

                        The process or shell execution.

                        Parameter problemMatchers

                        the names of problem matchers to use, like '$tsc' or '$eslint'. Problem matchers can be contributed by an extension using the problemMatchers extension point.

                      constructor

                      constructor(
                      taskDefinition: TaskDefinition,
                      name: string,
                      source: string,
                      execution?: ProcessExecution | ShellExecution,
                      problemMatchers?: string | string[]
                      );
                      • Creates a new task.

                        Parameter definition

                        The task definition as defined in the taskDefinitions extension point.

                        Parameter name

                        The task's name. Is presented in the user interface.

                        Parameter source

                        The task's source (e.g. 'gulp', 'npm', ...). Is presented in the user interface.

                        Parameter execution

                        The process or shell execution.

                        Parameter problemMatchers

                        the names of problem matchers to use, like '$tsc' or '$eslint'. Problem matchers can be contributed by an extension using the problemMatchers extension point.

                        Deprecated

                        Use the new constructors that allow specifying a scope for the task.

                      property definition

                      definition: TaskDefinition;
                      • The task's definition.

                      property detail

                      detail?: string;
                      • A human-readable string which is rendered less prominently on a separate line in places where the task's name is displayed. Supports rendering of via the $(<name>)-syntax.

                      property execution

                      execution?: ProcessExecution | ShellExecution | CustomExecution;
                      • The task's execution engine

                      property group

                      group?: TaskGroup;
                      • The task group this tasks belongs to. See TaskGroup for a predefined set of available groups. Defaults to undefined meaning that the task doesn't belong to any special group.

                      property isBackground

                      isBackground: boolean;
                      • Whether the task is a background task or not.

                      property name

                      name: string;
                      • The task's name

                      property presentationOptions

                      presentationOptions: TaskPresentationOptions;
                      • The presentation options. Defaults to an empty literal.

                      property problemMatchers

                      problemMatchers: string[];
                      • The problem matchers attached to the task. Defaults to an empty array.

                      property runOptions

                      runOptions: RunOptions;
                      • Run options for the task

                      property scope

                      readonly scope?: WorkspaceFolder | TaskScope;
                      • The task's scope.

                      property source

                      source: string;
                      • A human-readable string describing the source of this shell task, e.g. 'gulp' or 'npm'. Supports rendering of via the $(<name>)-syntax.

                      class TaskGroup

                      class TaskGroup {}
                      • A grouping for tasks. The editor by default supports the 'Clean', 'Build', 'RebuildAll' and 'Test' group.

                      property Build

                      static Build: TaskGroup;
                      • The build task group;

                      property Clean

                      static Clean: TaskGroup;
                      • The clean task group;

                      property Rebuild

                      static Rebuild: TaskGroup;
                      • The rebuild all task group;

                      property Test

                      static Test: TaskGroup;
                      • The test all task group;

                      class TerminalLink {}
                      • A link on a terminal line.

                      constructor

                      constructor(startIndex: number, length: number, tooltip?: string);
                      • Creates a new terminal link.

                        Parameter startIndex

                        The start index of the link on TerminalLinkContext.line.

                        Parameter length

                        The length of the link on TerminalLinkContext.line.

                        Parameter tooltip

                        The tooltip text when you hover over this link.

                        If a tooltip is provided, is will be displayed in a string that includes instructions on how to trigger the link, such as {0} (ctrl + click). The specific instructions vary depending on OS, user settings, and localization.

                      property length

                      length: number;

                      property startIndex

                      startIndex: number;

                      property tooltip

                      tooltip?: string;
                      • The tooltip text when you hover over this link.

                        If a tooltip is provided, is will be displayed in a string that includes instructions on how to trigger the link, such as {0} (ctrl + click). The specific instructions vary depending on OS, user settings, and localization.

                      class TerminalProfile

                      class TerminalProfile {}
                      • A terminal profile defines how a terminal will be launched.

                      constructor

                      constructor(options: TerminalOptions | ExtensionTerminalOptions);
                      • Creates a new terminal profile.

                        Parameter options

                        The options that the terminal will launch with.

                      property options

                      options: TerminalOptions | ExtensionTerminalOptions;
                      • The options that the terminal will launch with.

                      class TestMessage

                      class TestMessage {}
                      • Message associated with the test state. Can be linked to a specific source range -- useful for assertion failures, for example.

                      constructor

                      constructor(message: string | MarkdownString);
                      • Creates a new TestMessage instance.

                        Parameter message

                        The message to show to the user.

                      property actualOutput

                      actualOutput?: string;
                      • Actual test output. If given with expectedOutput, a diff view will be shown.

                      property expectedOutput

                      expectedOutput?: string;
                      • Expected test output. If given with actualOutput, a diff view will be shown.

                      property location

                      location?: Location;
                      • Associated file location.

                      property message

                      message: string | MarkdownString;
                      • Human-readable message text to display.

                      method diff

                      static diff: (
                      message: string | MarkdownString,
                      expected: string,
                      actual: string
                      ) => TestMessage;
                      • Creates a new TestMessage that will present as a diff in the editor.

                        Parameter message

                        Message to display to the user.

                        Parameter expected

                        Expected output.

                        Parameter actual

                        Actual output.

                      class TestRunRequest

                      class TestRunRequest {}
                      • A TestRunRequest is a precursor to a TestRun, which in turn is created by passing a request to tests.runTests. The TestRunRequest contains information about which tests should be run, which should not be run, and how they are run (via the profile).

                        In general, TestRunRequests are created by the editor and pass to TestRunProfile.runHandler, however you can also create test requests and runs outside of the runHandler.

                      constructor

                      constructor(
                      include?: readonly TestItem[],
                      exclude?: readonly TestItem[],
                      profile?: TestRunProfile
                      );
                      • Parameter tests

                        Array of specific tests to run, or undefined to run all tests

                        Parameter exclude

                        An array of tests to exclude from the run.

                        Parameter profile

                        The run profile used for this request.

                      property exclude

                      readonly exclude?: TestItem[];
                      • An array of tests the user has marked as excluded from the test included in this run; exclusions should apply after inclusions.

                        May be omitted if no exclusions were requested. Test controllers should not run excluded tests or any children of excluded tests.

                      property include

                      readonly include?: TestItem[];
                      • A filter for specific tests to run. If given, the extension should run all of the included tests and all their children, excluding any tests that appear in TestRunRequest.exclude. If this property is undefined, then the extension should simply run all tests.

                        The process of running tests should resolve the children of any test items who have not yet been resolved.

                      property profile

                      readonly profile?: TestRunProfile;
                      • The profile used for this request. This will always be defined for requests issued from the editor UI, though extensions may programmatically create requests not associated with any profile.

                      class TextEdit

                      class TextEdit {}
                      • A text edit represents edits that should be applied to a document.

                      constructor

                      constructor(range: Range, newText: string);
                      • Create a new TextEdit.

                        Parameter range

                        A range.

                        Parameter newText

                        A string.

                      property newEol

                      newEol?: EndOfLine;
                      • The eol-sequence used in the document.

                        *Note* that the eol-sequence will be applied to the whole document.

                      property newText

                      newText: string;
                      • The string this edit will insert.

                      property range

                      range: Range;
                      • The range this edit applies to.

                      method delete

                      static delete: (range: Range) => TextEdit;
                      • Utility to create a delete edit.

                        Parameter range

                        A range. A new text edit object.

                      method insert

                      static insert: (position: Position, newText: string) => TextEdit;
                      • Utility to create an insert edit.

                        Parameter position

                        A position, will become an empty range.

                        Parameter newText

                        A string. A new text edit object.

                      method replace

                      static replace: (range: Range, newText: string) => TextEdit;
                      • Utility to create a replace edit.

                        Parameter range

                        A range.

                        Parameter newText

                        A string. A new text edit object.

                      method setEndOfLine

                      static setEndOfLine: (eol: EndOfLine) => TextEdit;
                      • Utility to create an eol-edit.

                        Parameter eol

                        An eol-sequence A new text edit object.

                      class ThemeColor

                      class ThemeColor {}
                      • A reference to one of the workbench colors as defined in https://code.visualstudio.com/docs/getstarted/theme-color-reference. Using a theme color is preferred over a custom color as it gives theme authors and users the possibility to change the color.

                      constructor

                      constructor(id: string);
                      • Creates a reference to a theme color.

                        Parameter id

                        of the color. The available colors are listed in https://code.visualstudio.com/docs/getstarted/theme-color-reference.

                      class ThemeIcon

                      class ThemeIcon {}
                      • A reference to a named icon. Currently, , , and [ThemeIcon ids](https://code.visualstudio.com/api/references/icons-in-labels#icon-listing) are supported. Using a theme icon is preferred over a custom icon as it gives product theme authors the possibility to change the icons.

                        *Note* that theme icons can also be rendered inside labels and descriptions. Places that support theme icons spell this out and they use the $(<name>)-syntax, for instance quickPick.label = "Hello World $(globe)".

                      constructor

                      constructor(id: string, color?: ThemeColor);
                      • Creates a reference to a theme icon.

                        Parameter id

                        id of the icon. The available icons are listed in https://code.visualstudio.com/api/references/icons-in-labels#icon-listing.

                        Parameter color

                        optional ThemeColor for the icon. The color is currently only used in TreeItem.

                      property color

                      readonly color?: ThemeColor;
                      • The optional ThemeColor of the icon. The color is currently only used in TreeItem.

                      property File

                      static readonly File: ThemeIcon;
                      • Reference to an icon representing a file. The icon is taken from the current file icon theme or a placeholder icon is used.

                      property Folder

                      static readonly Folder: ThemeIcon;
                      • Reference to an icon representing a folder. The icon is taken from the current file icon theme or a placeholder icon is used.

                      property id

                      readonly id: string;
                      • The id of the icon. The available icons are listed in https://code.visualstudio.com/api/references/icons-in-labels#icon-listing.

                      class TreeItem

                      class TreeItem {}

                        constructor

                        constructor(
                        label: string | TreeItemLabel,
                        collapsibleState?: TreeItemCollapsibleState
                        );

                        constructor

                        constructor(resourceUri: Uri, collapsibleState?: TreeItemCollapsibleState);

                        property accessibilityInformation

                        accessibilityInformation?: AccessibilityInformation;
                        • Accessibility information used when screen reader interacts with this tree item. Generally, a TreeItem has no need to set the role of the accessibilityInformation; however, there are cases where a TreeItem is not displayed in a tree-like way where setting the role may make sense.

                        property collapsibleState

                        collapsibleState?: TreeItemCollapsibleState;

                        property command

                        command?: Command;
                        • The Command that should be executed when the tree item is selected.

                          Please use vscode.open or vscode.diff as command IDs when the tree item is opening something in the editor. Using these commands ensures that the resulting editor will appear consistent with how other built-in trees open editors.

                        property contextValue

                        contextValue?: string;
                        • Context value of the tree item. This can be used to contribute item specific actions in the tree. For example, a tree item is given a context value as folder. When contributing actions to view/item/context using menus extension point, you can specify context value for key viewItem in when expression like viewItem == folder.

                          "contributes": {
                          "menus": {
                          "view/item/context": [
                          {
                          "command": "extension.deleteFolder",
                          "when": "viewItem == folder"
                          }
                          ]
                          }
                          }

                          This will show action extension.deleteFolder only for items with contextValue is folder.

                        property description

                        description?: string | boolean;
                        • A human-readable string which is rendered less prominent. When true, it is derived from and when falsy, it is not shown.

                        property iconPath

                        iconPath?:
                        | string
                        | Uri
                        | ThemeIcon
                        | { light: string | Uri; dark: string | Uri };
                        • The icon path or ThemeIcon for the tree item. When falsy, is assigned, if item is collapsible otherwise . When a file or folder ThemeIcon is specified, icon is derived from the current file icon theme for the specified theme icon using (if provided).

                        property id

                        id?: string;
                        • Optional id for the tree item that has to be unique across tree. The id is used to preserve the selection and expansion state of the tree item.

                          If not provided, an id is generated using the tree item's label. **Note** that when labels change, ids will change and that selection and expansion state cannot be kept stable anymore.

                        property label

                        label?: string | TreeItemLabel;
                        • A human-readable string describing this item. When falsy, it is derived from .

                        property resourceUri

                        resourceUri?: Uri;
                        • The Uri of the resource representing this item.

                          Will be used to derive the , when it is not provided. Will be used to derive the icon from current file icon theme, when has ThemeIcon value.

                        property tooltip

                        tooltip?: string | MarkdownString;
                        • The tooltip text when you hover over this item.

                        class Uri

                        class Uri {}
                        • A universal resource identifier representing either a file on disk or another resource, like untitled resources.

                        property authority

                        readonly authority: string;
                        • Authority is the www.msft.com part of http://www.msft.com/some/path?query#fragment. The part between the first double slashes and the next slash.

                        property fragment

                        readonly fragment: string;
                        • Fragment is the fragment part of http://www.msft.com/some/path?query#fragment.

                        property fsPath

                        readonly fsPath: string;
                        • The string representing the corresponding file system path of this Uri.

                          Will handle UNC paths and normalize windows drive letters to lower-case. Also uses the platform specific path separator.

                          * Will *not* validate the path for invalid characters and semantics. * Will *not* look at the scheme of this Uri. * The resulting string shall *not* be used for display purposes but for disk operations, like readFile et al.

                          The *difference* to the -property is the use of the platform specific path separator and the handling of UNC paths. The sample below outlines the difference:

                          const u = URI.parse('file://server/c$/folder/file.txt')
                          u.authority === 'server'
                          u.path === '/shares/c$/file.txt'
                          u.fsPath === '\\server\c$\folder\file.txt'

                        property path

                        readonly path: string;
                        • Path is the /some/path part of http://www.msft.com/some/path?query#fragment.

                        property query

                        readonly query: string;
                        • Query is the query part of http://www.msft.com/some/path?query#fragment.

                        property scheme

                        readonly scheme: string;
                        • Scheme is the http part of http://www.msft.com/some/path?query#fragment. The part before the first colon.

                        method file

                        static file: (path: string) => Uri;
                        • Create an URI from a file system path. The will be file.

                          The *difference* between Uri.parse and Uri.file is that the latter treats the argument as path, not as stringified-uri. E.g. Uri.file(path) is *not* the same as Uri.parse('file://' + path) because the path might contain characters that are interpreted (# and ?). See the following sample:

                          const good = URI.file('/coding/c#/project1');
                          good.scheme === 'file';
                          good.path === '/coding/c#/project1';
                          good.fragment === '';
                          const bad = URI.parse('file://' + '/coding/c#/project1');
                          bad.scheme === 'file';
                          bad.path === '/coding/c'; // path is now broken
                          bad.fragment === '/project1';

                          Parameter path

                          A file system or UNC path. A new Uri instance.

                        method from

                        static from: (components: {
                        scheme: string;
                        authority?: string;
                        path?: string;
                        query?: string;
                        fragment?: string;
                        }) => Uri;
                        • Create an URI from its component parts

                          Parameter components

                          The component parts of an Uri. A new Uri instance.

                          See Also

                        method joinPath

                        static joinPath: (base: Uri, ...pathSegments: string[]) => Uri;
                        • Create a new uri which path is the result of joining the path of the base uri with the provided path segments.

                          - Note 1: joinPath only affects the path component and all other components (scheme, authority, query, and fragment) are left as they are. - Note 2: The base uri must have a path; an error is thrown otherwise.

                          The path segments are normalized in the following ways: - sequences of path separators (/ or \) are replaced with a single separator - for file-uris on windows, the backslash-character (\) is considered a path-separator - the ..-segment denotes the parent segment, the . denotes the current segment - paths have a root which always remains, for instance on windows drive-letters are roots so that is true: joinPath(Uri.file('file:///c:/root'), '../../other').fsPath === 'c:/other'

                          Parameter base

                          An uri. Must have a path.

                          Parameter pathSegments

                          One more more path fragments

                          Returns

                          A new uri which path is joined with the given fragments

                        method parse

                        static parse: (value: string, strict?: boolean) => Uri;
                        • Create an URI from a string, e.g. http://www.msft.com/some/path, file:///usr/home, or scheme:with/path.

                          *Note* that for a while uris without a scheme were accepted. That is not correct as all uris should have a scheme. To avoid breakage of existing code the optional strict-argument has been added. We *strongly* advise to use it, e.g. Uri.parse('my:uri', true)

                          Parameter value

                          The string value of an Uri.

                          Parameter strict

                          Throw an error when value is empty or when no scheme can be parsed. A new Uri instance.

                          See Also

                        method toJSON

                        toJSON: () => any;
                        • Returns a JSON representation of this Uri.

                          An object.

                        method toString

                        toString: (skipEncoding?: boolean) => string;
                        • Returns a string representation of this Uri. The representation and normalization of a URI depends on the scheme.

                          * The resulting string can be safely used with Uri.parse. * The resulting string shall *not* be used for display purposes.

                          *Note* that the implementation will encode _aggressive_ which often leads to unexpected, but not incorrect, results. For instance, colons are encoded to %3A which might be unexpected in file-uri. Also & and = will be encoded which might be unexpected for http-uris. For stability reasons this cannot be changed anymore. If you suffer from too aggressive encoding you should use the skipEncoding-argument: uri.toString(true).

                          Parameter skipEncoding

                          Do not percentage-encode the result, defaults to false. Note that the # and ? characters occurring in the path will always be encoded.

                          Returns

                          A string representation of this Uri.

                        method with

                        with: (change: {
                        scheme?: string;
                        authority?: string;
                        path?: string;
                        query?: string;
                        fragment?: string;
                        }) => Uri;
                        • Derive a new Uri from this Uri.

                          let file = Uri.parse('before:some/file/path');
                          let other = file.with({ scheme: 'after' });
                          assert.ok(other.toString() === 'after:some/file/path');

                          Parameter change

                          An object that describes a change to this Uri. To unset components use null or the empty string. A new Uri that reflects the given change. Will return this Uri if the change is not changing anything.

                        class WorkspaceEdit

                        class WorkspaceEdit {}
                        • A workspace edit is a collection of textual and files changes for multiple resources and documents.

                          Use the -function to apply a workspace edit.

                        property size

                        readonly size: number;
                        • The number of affected resources of textual or resource changes.

                        method createFile

                        createFile: (
                        uri: Uri,
                        options?: { overwrite?: boolean; ignoreIfExists?: boolean },
                        metadata?: WorkspaceEditEntryMetadata
                        ) => void;
                        • Create a regular file.

                          Parameter uri

                          Uri of the new file..

                          Parameter options

                          Defines if an existing file should be overwritten or be ignored. When overwrite and ignoreIfExists are both set overwrite wins. When both are unset and when the file already exists then the edit cannot be applied successfully.

                          Parameter metadata

                          Optional metadata for the entry.

                        method delete

                        delete: (uri: Uri, range: Range, metadata?: WorkspaceEditEntryMetadata) => void;
                        • Delete the text at the given range.

                          Parameter uri

                          A resource identifier.

                          Parameter range

                          A range.

                          Parameter metadata

                          Optional metadata for the entry.

                        method deleteFile

                        deleteFile: (
                        uri: Uri,
                        options?: { recursive?: boolean; ignoreIfNotExists?: boolean },
                        metadata?: WorkspaceEditEntryMetadata
                        ) => void;
                        • Delete a file or folder.

                          Parameter uri

                          The uri of the file that is to be deleted.

                          Parameter metadata

                          Optional metadata for the entry.

                        method entries

                        entries: () => [Uri, TextEdit[]][];
                        • Get all text edits grouped by resource.

                          A shallow copy of [Uri, TextEdit[]]-tuples.

                        method get

                        get: (uri: Uri) => TextEdit[];
                        • Get the text edits for a resource.

                          Parameter uri

                          A resource identifier. An array of text edits.

                        method has

                        has: (uri: Uri) => boolean;
                        • Check if a text edit for a resource exists.

                          Parameter uri

                          A resource identifier. true if the given resource will be touched by this edit.

                        method insert

                        insert: (
                        uri: Uri,
                        position: Position,
                        newText: string,
                        metadata?: WorkspaceEditEntryMetadata
                        ) => void;
                        • Insert the given text at the given position.

                          Parameter uri

                          A resource identifier.

                          Parameter position

                          A position.

                          Parameter newText

                          A string.

                          Parameter metadata

                          Optional metadata for the entry.

                        method renameFile

                        renameFile: (
                        oldUri: Uri,
                        newUri: Uri,
                        options?: { overwrite?: boolean; ignoreIfExists?: boolean },
                        metadata?: WorkspaceEditEntryMetadata
                        ) => void;
                        • Rename a file or folder.

                          Parameter oldUri

                          The existing file.

                          Parameter newUri

                          The new location.

                          Parameter options

                          Defines if existing files should be overwritten or be ignored. When overwrite and ignoreIfExists are both set overwrite wins.

                          Parameter metadata

                          Optional metadata for the entry.

                        method replace

                        replace: (
                        uri: Uri,
                        range: Range,
                        newText: string,
                        metadata?: WorkspaceEditEntryMetadata
                        ) => void;
                        • Replace the given range with given text for the given resource.

                          Parameter uri

                          A resource identifier.

                          Parameter range

                          A range.

                          Parameter newText

                          A string.

                          Parameter metadata

                          Optional metadata for the entry.

                        method set

                        set: (uri: Uri, edits: TextEdit[]) => void;
                        • Set (and replace) text edits for a resource.

                          Parameter uri

                          A resource identifier.

                          Parameter edits

                          An array of text edits.

                        interface AccessibilityInformation

                        interface AccessibilityInformation {}
                        • Accessibility information which controls screen reader behavior.

                        property label

                        label: string;
                        • Label to be read out by a screen reader once the item has focus.

                        property role

                        role?: string;
                        • Role of the widget which defines how a screen reader interacts with it. The role should be set in special cases when for example a tree-like element behaves like a checkbox. If role is not specified the editor will pick the appropriate role automatically. More about aria roles can be found here https://w3c.github.io/aria/#widget_roles

                        interface AuthenticationGetSessionOptions

                        interface AuthenticationGetSessionOptions {}

                        property clearSessionPreference

                        clearSessionPreference?: boolean;
                        • Whether the existing user session preference should be cleared.

                          For authentication providers that support being signed into multiple accounts at once, the user will be prompted to select an account to use when is called. This preference is remembered until is called with this flag.

                          Defaults to false.

                        property createIfNone

                        createIfNone?: boolean;
                        • Whether login should be performed if there is no matching session.

                          If true, a modal dialog will be shown asking the user to sign in. If false, a numbered badge will be shown on the accounts activity bar icon. An entry for the extension will be added under the menu to sign in. This allows quietly prompting the user to sign in.

                          If there is a matching session but the extension has not been granted access to it, setting this to true will also result in an immediate modal dialog, and false will add a numbered badge to the accounts icon.

                          Defaults to false.

                        interface AuthenticationProvider

                        interface AuthenticationProvider {}
                        • A provider for performing authentication to a service.

                        property onDidChangeSessions

                        readonly onDidChangeSessions: Event<AuthenticationProviderAuthenticationSessionsChangeEvent>;
                        • An Event which fires when the array of sessions has changed, or data within a session has changed.

                        method createSession

                        createSession: (scopes: readonly string[]) => Thenable<AuthenticationSession>;
                        • Prompts a user to login.

                          If login is successful, the onDidChangeSessions event should be fired.

                          If login fails, a rejected promise should be returned.

                          If the provider has specified that it does not support multiple accounts, then this should never be called if there is already an existing session matching these scopes.

                          Parameter scopes

                          A list of scopes, permissions, that the new session should be created with.

                          Returns

                          A promise that resolves to an authentication session.

                        method getSessions

                        getSessions: (
                        scopes?: readonly string[]
                        ) => Thenable<readonly AuthenticationSession[]>;
                        • Get a list of sessions.

                          Parameter scopes

                          An optional list of scopes. If provided, the sessions returned should match these permissions, otherwise all sessions should be returned.

                          Returns

                          A promise that resolves to an array of authentication sessions.

                        method removeSession

                        removeSession: (sessionId: string) => Thenable<void>;
                        • Removes the session corresponding to session id.

                          If the removal is successful, the onDidChangeSessions event should be fired.

                          If a session cannot be removed, the provider should reject with an error message.

                          Parameter sessionId

                          The id of the session to remove.

                        interface AuthenticationProviderAuthenticationSessionsChangeEvent

                        interface AuthenticationProviderAuthenticationSessionsChangeEvent {}

                        property added

                        readonly added?: readonly AuthenticationSession[];

                        property changed

                        readonly changed?: readonly AuthenticationSession[];
                        • The AuthenticationSessions of the AuthenticationProvider that have been changed. A session changes when its data excluding the id are updated. An example of this is a session refresh that results in a new access token being set for the session.

                        property removed

                        readonly removed?: readonly AuthenticationSession[];

                        interface AuthenticationProviderInformation

                        interface AuthenticationProviderInformation {}

                        property id

                        readonly id: string;
                        • The unique identifier of the authentication provider.

                        property label

                        readonly label: string;
                        • The human-readable name of the authentication provider.

                        interface AuthenticationProviderOptions

                        interface AuthenticationProviderOptions {}

                        property supportsMultipleAccounts

                        readonly supportsMultipleAccounts?: boolean;
                        • Whether it is possible to be signed into multiple accounts at once with this provider. If not specified, will default to false.

                        interface AuthenticationSession

                        interface AuthenticationSession {}
                        • Represents a session of a currently logged in user.

                        property accessToken

                        readonly accessToken: string;
                        • The access token.

                        property account

                        readonly account: AuthenticationSessionAccountInformation;
                        • The account associated with the session.

                        property id

                        readonly id: string;
                        • The identifier of the authentication session.

                        property scopes

                        readonly scopes: readonly string[];
                        • The permissions granted by the session's access token. Available scopes are defined by the AuthenticationProvider.

                        interface AuthenticationSessionAccountInformation

                        interface AuthenticationSessionAccountInformation {}

                        property id

                        readonly id: string;
                        • The unique identifier of the account.

                        property label

                        readonly label: string;
                        • The human-readable name of the account.

                        interface AuthenticationSessionsChangeEvent

                        interface AuthenticationSessionsChangeEvent {}

                        property provider

                        readonly provider: AuthenticationProviderInformation;

                        interface BreakpointsChangeEvent

                        interface BreakpointsChangeEvent {}
                        • An event describing the changes to the set of .

                        property added

                        readonly added: readonly Breakpoint[];
                        • Added breakpoints.

                        property changed

                        readonly changed: readonly Breakpoint[];
                        • Changed breakpoints.

                        property removed

                        readonly removed: readonly Breakpoint[];
                        • Removed breakpoints.

                        interface CallHierarchyProvider

                        interface CallHierarchyProvider {}
                        • The call hierarchy provider interface describes the contract between extensions and the call hierarchy feature which allows to browse calls and caller of function, methods, constructor etc.

                        method prepareCallHierarchy

                        prepareCallHierarchy: (
                        document: TextDocument,
                        position: Position,
                        token: CancellationToken
                        ) => ProviderResult<CallHierarchyItem | CallHierarchyItem[]>;
                        • Bootstraps call hierarchy by returning the item that is denoted by the given document and position. This item will be used as entry into the call graph. Providers should return undefined or null when there is no item at the given location.

                          Parameter document

                          The document in which the command was invoked.

                          Parameter position

                          The position at which the command was invoked.

                          Parameter token

                          A cancellation token.

                          Returns

                          A call hierarchy item or a thenable that resolves to such. The lack of a result can be signaled by returning undefined or null.

                        method provideCallHierarchyIncomingCalls

                        provideCallHierarchyIncomingCalls: (
                        item: CallHierarchyItem,
                        token: CancellationToken
                        ) => ProviderResult<CallHierarchyIncomingCall[]>;
                        • Provide all incoming calls for an item, e.g all callers for a method. In graph terms this describes directed and annotated edges inside the call graph, e.g the given item is the starting node and the result is the nodes that can be reached.

                          Parameter item

                          The hierarchy item for which incoming calls should be computed.

                          Parameter token

                          A cancellation token.

                          Returns

                          A set of incoming calls or a thenable that resolves to such. The lack of a result can be signaled by returning undefined or null.

                        method provideCallHierarchyOutgoingCalls

                        provideCallHierarchyOutgoingCalls: (
                        item: CallHierarchyItem,
                        token: CancellationToken
                        ) => ProviderResult<CallHierarchyOutgoingCall[]>;
                        • Provide all outgoing calls for an item, e.g call calls to functions, methods, or constructors from the given item. In graph terms this describes directed and annotated edges inside the call graph, e.g the given item is the starting node and the result is the nodes that can be reached.

                          Parameter item

                          The hierarchy item for which outgoing calls should be computed.

                          Parameter token

                          A cancellation token.

                          Returns

                          A set of outgoing calls or a thenable that resolves to such. The lack of a result can be signaled by returning undefined or null.

                        interface CancellationToken

                        interface CancellationToken {}
                        • A cancellation token is passed to an asynchronous or long running operation to request cancellation, like cancelling a request for completion items because the user continued to type.

                          To get an instance of a CancellationToken use a CancellationTokenSource.

                        property isCancellationRequested

                        isCancellationRequested: boolean;
                        • Is true when the token has been cancelled, false otherwise.

                        property onCancellationRequested

                        onCancellationRequested: Event<any>;
                        • An Event which fires upon cancellation.

                        interface Clipboard

                        interface Clipboard {}
                        • The clipboard provides read and write access to the system's clipboard.

                        method readText

                        readText: () => Thenable<string>;
                        • Read the current clipboard contents as text.

                          Returns

                          A thenable that resolves to a string.

                        method writeText

                        writeText: (value: string) => Thenable<void>;
                        • Writes text into the clipboard.

                          Returns

                          A thenable that resolves when writing happened.

                        interface CodeActionContext

                        interface CodeActionContext {}
                        • Contains additional diagnostic information about the context in which a is run.

                        property diagnostics

                        readonly diagnostics: readonly Diagnostic[];
                        • An array of diagnostics.

                        property only

                        readonly only?: CodeActionKind;
                        • Requested kind of actions to return.

                          Actions not of this kind are filtered out before being shown by the [lightbulb](https://code.visualstudio.com/docs/editor/editingevolved#_code-action).

                        property triggerKind

                        readonly triggerKind: CodeActionTriggerKind;
                        • The reason why code actions were requested.

                        interface CodeActionProvider

                        interface CodeActionProvider<T extends CodeAction = CodeAction> {}
                        • The code action interface defines the contract between extensions and the [lightbulb](https://code.visualstudio.com/docs/editor/editingevolved#_code-action) feature.

                          A code action can be any command that is to the system.

                        method provideCodeActions

                        provideCodeActions: (
                        document: TextDocument,
                        range: Range | Selection,
                        context: CodeActionContext,
                        token: CancellationToken
                        ) => ProviderResult<(Command | T)[]>;
                        • Provide commands for the given document and range.

                          Parameter document

                          The document in which the command was invoked.

                          Parameter range

                          The selector or range for which the command was invoked. This will always be a selection if there is a currently active editor.

                          Parameter context

                          Context carrying additional information.

                          Parameter token

                          A cancellation token.

                          An array of code actions, such as quick fixes or refactorings. The lack of a result can be signaled by returning undefined, null, or an empty array.

                          We also support returning Command for legacy reasons, however all new extensions should return CodeAction object instead.

                        method resolveCodeAction

                        resolveCodeAction: (
                        codeAction: T,
                        token: CancellationToken
                        ) => ProviderResult<T>;
                        • Given a code action fill in its -property. Changes to all other properties, like title, are ignored. A code action that has an edit will not be resolved.

                          *Note* that a code action provider that returns commands, not code actions, cannot successfully implement this function. Returning commands is deprecated and instead code actions should be returned.

                          Parameter codeAction

                          A code action.

                          Parameter token

                          A cancellation token. The resolved code action or a thenable that resolves to such. It is OK to return the given item. When no result is returned, the given item will be used.

                        interface CodeActionProviderMetadata

                        interface CodeActionProviderMetadata {}

                        property documentation

                        readonly documentation?: ReadonlyArray<{
                        /**
                        * The kind of the code action being documented.
                        *
                        * If the kind is generic, such as `CodeActionKind.Refactor`, the documentation will be shown whenever any
                        * refactorings are returned. If the kind if more specific, such as `CodeActionKind.RefactorExtract`, the
                        * documentation will only be shown when extract refactoring code actions are returned.
                        */
                        readonly kind: CodeActionKind;
                        /**
                        * Command that displays the documentation to the user.
                        *
                        * This can display the documentation directly in the editor or open a website using {@link env.openExternal `env.openExternal`};
                        *
                        * The title of this documentation code action is taken from {@link Command.title `Command.title`}
                        */
                        readonly command: Command;
                        }>;
                        • Static documentation for a class of code actions.

                          Documentation from the provider is shown in the code actions menu if either:

                          - Code actions of kind are requested by the editor. In this case, the editor will show the documentation that most closely matches the requested code action kind. For example, if a provider has documentation for both Refactor and RefactorExtract, when the user requests code actions for RefactorExtract, the editor will use the documentation for RefactorExtract instead of the documentation for Refactor.

                          - Any code actions of kind are returned by the provider.

                          At most one documentation entry will be shown per provider.

                        property providedCodeActionKinds

                        readonly providedCodeActionKinds?: readonly CodeActionKind[];
                        • List of that a CodeActionProvider may return.

                          This list is used to determine if a given CodeActionProvider should be invoked or not. To avoid unnecessary computation, every CodeActionProvider should list use providedCodeActionKinds. The list of kinds may either be generic, such as [CodeActionKind.Refactor], or list out every kind provided, such as [CodeActionKind.Refactor.Extract.append('function'), CodeActionKind.Refactor.Extract.append('constant'), ...].

                        interface CodeLensProvider

                        interface CodeLensProvider<T extends CodeLens = CodeLens> {}
                        • A code lens provider adds to source text. The commands will be shown as dedicated horizontal lines in between the source text.

                        property onDidChangeCodeLenses

                        onDidChangeCodeLenses?: Event<void>;
                        • An optional event to signal that the code lenses from this provider have changed.

                        method provideCodeLenses

                        provideCodeLenses: (
                        document: TextDocument,
                        token: CancellationToken
                        ) => ProviderResult<T[]>;
                        • Compute a list of . This call should return as fast as possible and if computing the commands is expensive implementors should only return code lens objects with the range set and implement .

                          Parameter document

                          The document in which the command was invoked.

                          Parameter token

                          A cancellation token. An array of code lenses or a thenable that resolves to such. The lack of a result can be signaled by returning undefined, null, or an empty array.

                        method resolveCodeLens

                        resolveCodeLens: (codeLens: T, token: CancellationToken) => ProviderResult<T>;
                        • This function will be called for each visible code lens, usually when scrolling and after calls to -lenses.

                          Parameter codeLens

                          Code lens that must be resolved.

                          Parameter token

                          A cancellation token. The given, resolved code lens or thenable that resolves to such.

                        interface ColorTheme

                        interface ColorTheme {}
                        • Represents a color theme.

                        property kind

                        readonly kind: ColorThemeKind;
                        • The kind of this color theme: light, dark or high contrast.

                        interface Command

                        interface Command {}
                        • Represents a reference to a command. Provides a title which will be used to represent a command in the UI and, optionally, an array of arguments which will be passed to the command handler function when invoked.

                        property arguments