mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 (#6381)
* Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 * disable strict null check
This commit is contained in:
337
src/vs/vscode.d.ts
vendored
337
src/vs/vscode.d.ts
vendored
@@ -531,16 +531,16 @@ declare module 'vscode' {
|
||||
/**
|
||||
* The [text editor](#TextEditor) for which the selections have changed.
|
||||
*/
|
||||
textEditor: TextEditor;
|
||||
readonly textEditor: TextEditor;
|
||||
/**
|
||||
* The new value for the [text editor's selections](#TextEditor.selections).
|
||||
*/
|
||||
selections: Selection[];
|
||||
readonly selections: ReadonlyArray<Selection>;
|
||||
/**
|
||||
* The [change kind](#TextEditorSelectionChangeKind) which has triggered this
|
||||
* event. Can be `undefined`.
|
||||
*/
|
||||
kind?: TextEditorSelectionChangeKind;
|
||||
readonly kind?: TextEditorSelectionChangeKind;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -550,11 +550,11 @@ declare module 'vscode' {
|
||||
/**
|
||||
* The [text editor](#TextEditor) for which the visible ranges have changed.
|
||||
*/
|
||||
textEditor: TextEditor;
|
||||
readonly textEditor: TextEditor;
|
||||
/**
|
||||
* The new value for the [text editor's visible ranges](#TextEditor.visibleRanges).
|
||||
*/
|
||||
visibleRanges: Range[];
|
||||
readonly visibleRanges: ReadonlyArray<Range>;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -564,11 +564,11 @@ declare module 'vscode' {
|
||||
/**
|
||||
* The [text editor](#TextEditor) for which the options have changed.
|
||||
*/
|
||||
textEditor: TextEditor;
|
||||
readonly textEditor: TextEditor;
|
||||
/**
|
||||
* The new value for the [text editor's options](#TextEditor.options).
|
||||
*/
|
||||
options: TextEditorOptions;
|
||||
readonly options: TextEditorOptions;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -578,11 +578,11 @@ declare module 'vscode' {
|
||||
/**
|
||||
* The [text editor](#TextEditor) for which the view column has changed.
|
||||
*/
|
||||
textEditor: TextEditor;
|
||||
readonly textEditor: TextEditor;
|
||||
/**
|
||||
* The new value for the [text editor's view column](#TextEditor.viewColumn).
|
||||
*/
|
||||
viewColumn: ViewColumn;
|
||||
readonly viewColumn: ViewColumn;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1101,7 +1101,7 @@ declare module 'vscode' {
|
||||
|
||||
/**
|
||||
* The column in which this editor shows. Will be `undefined` in case this
|
||||
* isn't one of the main editors, e.g an embedded editor, or when the editor
|
||||
* isn't one of the main editors, e.g. an embedded editor, or when the editor
|
||||
* column is larger than three.
|
||||
*/
|
||||
viewColumn?: ViewColumn;
|
||||
@@ -1130,7 +1130,7 @@ declare module 'vscode' {
|
||||
* @return A promise that resolves with a value indicating if the snippet could be inserted. Note that the promise does not signal
|
||||
* that the snippet is completely filled-in or accepted.
|
||||
*/
|
||||
insertSnippet(snippet: SnippetString, location?: Position | Range | Position[] | Range[], options?: { undoStopBefore: boolean; undoStopAfter: boolean; }): Thenable<boolean>;
|
||||
insertSnippet(snippet: SnippetString, location?: Position | Range | ReadonlyArray<Position> | ReadonlyArray<Range>, options?: { undoStopBefore: boolean; undoStopAfter: boolean; }): Thenable<boolean>;
|
||||
|
||||
/**
|
||||
* Adds a set of decorations to the text editor. If a set of decorations already exists with
|
||||
@@ -1900,7 +1900,7 @@ declare module 'vscode' {
|
||||
*
|
||||
* *Note* that a document selector that is just a language identifier selects *all*
|
||||
* documents, even those that are not saved on disk. Only use such selectors when
|
||||
* a feature works without further context, e.g without the need to resolve related
|
||||
* a feature works without further context, e.g. without the need to resolve related
|
||||
* 'files'.
|
||||
*
|
||||
* @sample `let sel:DocumentSelector = { scheme: 'file', language: 'typescript' }`;
|
||||
@@ -2070,7 +2070,7 @@ declare module 'vscode' {
|
||||
/**
|
||||
* An array of diagnostics.
|
||||
*/
|
||||
readonly diagnostics: Diagnostic[];
|
||||
readonly diagnostics: ReadonlyArray<Diagnostic>;
|
||||
|
||||
/**
|
||||
* Requested kind of actions to return.
|
||||
@@ -2595,7 +2595,7 @@ declare module 'vscode' {
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* More detail for this symbol, e.g the signature of a function.
|
||||
* More detail for this symbol, e.g. the signature of a function.
|
||||
*/
|
||||
detail: string;
|
||||
|
||||
@@ -2605,12 +2605,12 @@ declare module 'vscode' {
|
||||
kind: SymbolKind;
|
||||
|
||||
/**
|
||||
* The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g comments and code.
|
||||
* The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g. comments and code.
|
||||
*/
|
||||
range: Range;
|
||||
|
||||
/**
|
||||
* The range that should be selected and reveal when this symbol is being picked, e.g the name of a function.
|
||||
* 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 [`range`](#DocumentSymbol.range).
|
||||
*/
|
||||
selectionRange: Range;
|
||||
@@ -2903,7 +2903,7 @@ declare module 'vscode' {
|
||||
* 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](http://code.visualstudio.com/docs/editor/userdefinedsnippets#_creating-your-own-snippets).
|
||||
* [here](https://code.visualstudio.com/docs/editor/userdefinedsnippets#_creating-your-own-snippets).
|
||||
*/
|
||||
export class SnippetString {
|
||||
|
||||
@@ -3515,6 +3515,10 @@ declare module 'vscode' {
|
||||
*
|
||||
* The editor will only resolve a completion item once.
|
||||
*
|
||||
* *Note* that accepting a completion item will not wait for it to be resolved. Because of that [`insertText`](#CompletionItem.insertText),
|
||||
* [`additionalTextEdits`](#CompletionItem.additionalTextEdits), and [`command`](#CompletionItem.command) should not
|
||||
* be changed when resolving an item.
|
||||
*
|
||||
* @param item A completion item currently active in the UI.
|
||||
* @param token A cancellation token.
|
||||
* @return The resolved completion item or a thenable that resolves to of such. It is OK to return the given
|
||||
@@ -3540,6 +3544,15 @@ declare module 'vscode' {
|
||||
*/
|
||||
target?: Uri;
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
tooltip?: string;
|
||||
|
||||
/**
|
||||
* Creates a new document link.
|
||||
*
|
||||
@@ -3645,7 +3658,7 @@ declare module 'vscode' {
|
||||
*
|
||||
* 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`.
|
||||
* apply, e.g. `System.Drawing.Color.Red`.
|
||||
*/
|
||||
export class ColorPresentation {
|
||||
|
||||
@@ -3813,7 +3826,7 @@ declare module 'vscode' {
|
||||
/**
|
||||
* Provide selection ranges for the given positions.
|
||||
*
|
||||
* Selection ranges should be computed individually and independend for each postion. The editor will merge
|
||||
* Selection ranges should be computed individually and independend for each position. The editor will merge
|
||||
* and deduplicate ranges but providers must return hierarchies of selection ranges so that a range
|
||||
* is [contained](#Range.contains) by its parent.
|
||||
*
|
||||
@@ -4199,7 +4212,7 @@ declare module 'vscode' {
|
||||
/**
|
||||
* An array of resources for which diagnostics have changed.
|
||||
*/
|
||||
readonly uris: Uri[];
|
||||
readonly uris: ReadonlyArray<Uri>;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4231,7 +4244,7 @@ declare module 'vscode' {
|
||||
|
||||
/**
|
||||
* 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
|
||||
* used to point to code locations that cause or related to a diagnostics, e.g. when duplicating
|
||||
* a symbol in a scope.
|
||||
*/
|
||||
export class DiagnosticRelatedInformation {
|
||||
@@ -4350,7 +4363,7 @@ declare module 'vscode' {
|
||||
* @param uri A resource identifier.
|
||||
* @param diagnostics Array of diagnostics or `undefined`
|
||||
*/
|
||||
set(uri: Uri, diagnostics: Diagnostic[] | undefined): void;
|
||||
set(uri: Uri, diagnostics: ReadonlyArray<Diagnostic> | undefined): void;
|
||||
|
||||
/**
|
||||
* Replace all entries in this collection.
|
||||
@@ -4362,7 +4375,7 @@ declare module 'vscode' {
|
||||
*
|
||||
* @param entries An array of tuples, like `[[file1, [d1, d2]], [file2, [d3, d4, d5]]]`, or `undefined`.
|
||||
*/
|
||||
set(entries: [Uri, Diagnostic[] | undefined][]): void;
|
||||
set(entries: ReadonlyArray<[Uri, ReadonlyArray<Diagnostic> | undefined]>): void;
|
||||
|
||||
/**
|
||||
* Remove all diagnostics from this collection that belong
|
||||
@@ -4384,7 +4397,7 @@ declare module 'vscode' {
|
||||
* @param callback Function to execute for each entry.
|
||||
* @param thisArg The `this` context used when invoking the handler function.
|
||||
*/
|
||||
forEach(callback: (uri: Uri, diagnostics: Diagnostic[], collection: DiagnosticCollection) => any, thisArg?: any): void;
|
||||
forEach(callback: (uri: Uri, diagnostics: ReadonlyArray<Diagnostic>, collection: DiagnosticCollection) => any, thisArg?: any): void;
|
||||
|
||||
/**
|
||||
* Get the diagnostics for a given resource. *Note* that you cannot
|
||||
@@ -4393,7 +4406,7 @@ declare module 'vscode' {
|
||||
* @param uri A resource identifier.
|
||||
* @returns An immutable array of [diagnostics](#Diagnostic) or `undefined`.
|
||||
*/
|
||||
get(uri: Uri): Diagnostic[] | undefined;
|
||||
get(uri: Uri): ReadonlyArray<Diagnostic> | undefined;
|
||||
|
||||
/**
|
||||
* Check if this collection contains diagnostics for a
|
||||
@@ -4661,6 +4674,23 @@ declare module 'vscode' {
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* In a remote window the extension kind describes if an extension
|
||||
* runs where the UI (window) runs or if an extension runs remotely.
|
||||
*/
|
||||
export enum ExtensionKind {
|
||||
|
||||
/**
|
||||
* Extension runs where the UI runs.
|
||||
*/
|
||||
UI = 1,
|
||||
|
||||
/**
|
||||
* Extension runs where the remote extension host runs.
|
||||
*/
|
||||
Workspace = 2
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents an extension.
|
||||
*
|
||||
@@ -4688,6 +4718,15 @@ declare module 'vscode' {
|
||||
*/
|
||||
readonly packageJSON: any;
|
||||
|
||||
/**
|
||||
* The extension kind describes if an extension runs where the UI runs
|
||||
* or if an extension runs where the remote extension host runs. The extension kind
|
||||
* if defined in the `package.json` file of extensions but can also be refined
|
||||
* via the the `remote.extensionKind`-setting. When no remote extension host exists,
|
||||
* the value is [`ExtensionKind.UI`](#ExtensionKind.UI).
|
||||
*/
|
||||
extensionKind: ExtensionKind;
|
||||
|
||||
/**
|
||||
* The public API exported by this extension. It is an invalid action
|
||||
* to access this field before this extension has been activated.
|
||||
@@ -4715,24 +4754,24 @@ declare module 'vscode' {
|
||||
* An array to which disposables can be added. When this
|
||||
* extension is deactivated the disposables will be disposed.
|
||||
*/
|
||||
subscriptions: { dispose(): any }[];
|
||||
readonly subscriptions: { dispose(): any }[];
|
||||
|
||||
/**
|
||||
* A memento object that stores state in the context
|
||||
* of the currently opened [workspace](#workspace.workspaceFolders).
|
||||
*/
|
||||
workspaceState: Memento;
|
||||
readonly workspaceState: Memento;
|
||||
|
||||
/**
|
||||
* A memento object that stores state independent
|
||||
* of the current opened [workspace](#workspace.workspaceFolders).
|
||||
*/
|
||||
globalState: Memento;
|
||||
readonly globalState: Memento;
|
||||
|
||||
/**
|
||||
* The absolute file path of the directory containing the extension.
|
||||
*/
|
||||
extensionPath: string;
|
||||
readonly extensionPath: string;
|
||||
|
||||
/**
|
||||
* Get the absolute path of a resource contained in the extension.
|
||||
@@ -4750,7 +4789,7 @@ declare module 'vscode' {
|
||||
* Use [`workspaceState`](#ExtensionContext.workspaceState) or
|
||||
* [`globalState`](#ExtensionContext.globalState) to store key value data.
|
||||
*/
|
||||
storagePath: string | undefined;
|
||||
readonly storagePath: string | undefined;
|
||||
|
||||
/**
|
||||
* An absolute file path in which the extension can store global state.
|
||||
@@ -4759,14 +4798,14 @@ declare module 'vscode' {
|
||||
*
|
||||
* Use [`globalState`](#ExtensionContext.globalState) to store key value data.
|
||||
*/
|
||||
globalStoragePath: string;
|
||||
readonly globalStoragePath: string;
|
||||
|
||||
/**
|
||||
* An absolute file path of a directory in which the extension can create log files.
|
||||
* The directory might not exist on disk and creation is up to the extension. However,
|
||||
* the parent directory is guaranteed to be existent.
|
||||
*/
|
||||
logPath: string;
|
||||
readonly logPath: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5327,7 +5366,7 @@ declare module 'vscode' {
|
||||
/**
|
||||
* The task item representing the task that got started.
|
||||
*/
|
||||
execution: TaskExecution;
|
||||
readonly execution: TaskExecution;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5339,7 +5378,7 @@ declare module 'vscode' {
|
||||
/**
|
||||
* The task item representing the task that finished.
|
||||
*/
|
||||
execution: TaskExecution;
|
||||
readonly execution: TaskExecution;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5351,12 +5390,12 @@ declare module 'vscode' {
|
||||
/**
|
||||
* The task execution for which the process got started.
|
||||
*/
|
||||
execution: TaskExecution;
|
||||
readonly execution: TaskExecution;
|
||||
|
||||
/**
|
||||
* The underlying process id.
|
||||
*/
|
||||
processId: number;
|
||||
readonly processId: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5368,12 +5407,12 @@ declare module 'vscode' {
|
||||
/**
|
||||
* The task execution for which the process got started.
|
||||
*/
|
||||
execution: TaskExecution;
|
||||
readonly execution: TaskExecution;
|
||||
|
||||
/**
|
||||
* The process's exit code.
|
||||
*/
|
||||
exitCode: number;
|
||||
readonly exitCode: number;
|
||||
}
|
||||
|
||||
export interface TaskFilter {
|
||||
@@ -5580,12 +5619,12 @@ declare module 'vscode' {
|
||||
/**
|
||||
* The type of change.
|
||||
*/
|
||||
type: FileChangeType;
|
||||
readonly type: FileChangeType;
|
||||
|
||||
/**
|
||||
* The uri of the file that has changed.
|
||||
*/
|
||||
uri: Uri;
|
||||
readonly uri: Uri;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5714,6 +5753,82 @@ declare module 'vscode' {
|
||||
copy?(source: Uri, destination: Uri, options: { overwrite: boolean }): void | Thenable<void>;
|
||||
}
|
||||
|
||||
/**
|
||||
* The file system interface exposes the editor's built-in and contributed
|
||||
* [file system providers](#FileSystemProvider). It allows extensions to work
|
||||
* with files from the local disk as well as files from remote places, like the
|
||||
* remote extension host or ftp-servers.
|
||||
*
|
||||
* *Note* that an instance of this interface is avaiable as [`workspace.fs`](#workspace.fs).
|
||||
*/
|
||||
export interface FileSystem {
|
||||
|
||||
/**
|
||||
* Retrieve metadata about a file.
|
||||
*
|
||||
* @param uri The uri of the file to retrieve metadata about.
|
||||
* @return The file metadata about the file.
|
||||
*/
|
||||
stat(uri: Uri): Thenable<FileStat>;
|
||||
|
||||
/**
|
||||
* Retrieve all entries of a [directory](#FileType.Directory).
|
||||
*
|
||||
* @param uri The uri of the folder.
|
||||
* @return An array of name/type-tuples or a thenable that resolves to such.
|
||||
*/
|
||||
readDirectory(uri: Uri): Thenable<[string, FileType][]>;
|
||||
|
||||
/**
|
||||
* Create a new directory (Note, that new files are created via `write`-calls).
|
||||
*
|
||||
* @param uri The uri of the new folder.
|
||||
*/
|
||||
createDirectory(uri: Uri): Thenable<void>;
|
||||
|
||||
/**
|
||||
* Read the entire contents of a file.
|
||||
*
|
||||
* @param uri The uri of the file.
|
||||
* @return An array of bytes or a thenable that resolves to such.
|
||||
*/
|
||||
readFile(uri: Uri): Thenable<Uint8Array>;
|
||||
|
||||
/**
|
||||
* Write data to a file, replacing its entire contents.
|
||||
*
|
||||
* @param uri The uri of the file.
|
||||
* @param content The new content of the file.
|
||||
*/
|
||||
writeFile(uri: Uri, content: Uint8Array): Thenable<void>;
|
||||
|
||||
/**
|
||||
* Delete a file.
|
||||
*
|
||||
* @param uri The resource that is to be deleted.
|
||||
* @param options Defines if trash can should be used and if deletion of folders is recursive
|
||||
*/
|
||||
delete(uri: Uri, options?: { recursive?: boolean, useTrash?: boolean }): Thenable<void>;
|
||||
|
||||
/**
|
||||
* Rename a file or folder.
|
||||
*
|
||||
* @param oldUri The existing file.
|
||||
* @param newUri The new location.
|
||||
* @param options Defines if existing files should be overwritten.
|
||||
*/
|
||||
rename(source: Uri, target: Uri, options?: { overwrite?: boolean }): Thenable<void>;
|
||||
|
||||
/**
|
||||
* Copy files or folders.
|
||||
*
|
||||
* @param source The existing file.
|
||||
* @param destination The destination location.
|
||||
* @param options Defines if existing files should be overwritten.
|
||||
*/
|
||||
copy(source: Uri, target: Uri, options?: { overwrite?: boolean }): Thenable<void>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines a port mapping used for localhost inside the webview.
|
||||
*/
|
||||
@@ -6029,6 +6144,23 @@ declare module 'vscode' {
|
||||
*/
|
||||
export const sessionId: string;
|
||||
|
||||
/**
|
||||
* The name of a remote. Defined by extensions, popular samples are `wsl` for the Windows
|
||||
* Subsystem for Linux or `ssh-remote` for remotes using a secure shell.
|
||||
*
|
||||
* *Note* that the value is `undefined` when there is no remote extension host but that the
|
||||
* value is defined in all extension hosts (local and remote) in case a remote extension host
|
||||
* exists. Use [`Extension#extensionKind`](#Extension.extensionKind) to know if
|
||||
* a specific extension runs remote or not.
|
||||
*/
|
||||
export const remoteName: string | undefined;
|
||||
|
||||
/**
|
||||
* The detected default shell for the extension host, this is overridden by the
|
||||
* `terminal.integrated.shell` setting for the extension host's platform.
|
||||
*/
|
||||
export const shell: string;
|
||||
|
||||
/**
|
||||
* Opens an *external* item, e.g. a http(s) or mailto-link, using the
|
||||
* default application.
|
||||
@@ -6676,7 +6808,7 @@ declare module 'vscode' {
|
||||
* the following rules:
|
||||
*
|
||||
* - The uri-scheme must be `vscode.env.uriScheme`;
|
||||
* - The uri-authority must be the extension id (eg. `my.extension`);
|
||||
* - The uri-authority must be the extension id (e.g. `my.extension`);
|
||||
* - The uri-path, -query and -fragment parts are arbitrary.
|
||||
*
|
||||
* For example, if the `my.extension` extension registers a uri handler, it will only
|
||||
@@ -6984,6 +7116,15 @@ declare module 'vscode' {
|
||||
* must be provided as nothing will be inherited from the process or any configuration.
|
||||
*/
|
||||
strictEnv?: boolean;
|
||||
|
||||
/**
|
||||
* When enabled the terminal will run the process as normal but not be surfaced to the user
|
||||
* until `Terminal.show` is called. The typical usage for this is when you need to run
|
||||
* something that may need interactivity but only want to tell the user about it when
|
||||
* interaction is needed. Note that the terminals will still be exposed to all extensions
|
||||
* as normal.
|
||||
*/
|
||||
hideFromUser?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -7327,12 +7468,12 @@ declare module 'vscode' {
|
||||
/**
|
||||
* The affected document.
|
||||
*/
|
||||
document: TextDocument;
|
||||
readonly document: TextDocument;
|
||||
|
||||
/**
|
||||
* An array of content changes.
|
||||
*/
|
||||
contentChanges: TextDocumentContentChangeEvent[];
|
||||
readonly contentChanges: ReadonlyArray<TextDocumentContentChangeEvent>;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -7369,12 +7510,12 @@ declare module 'vscode' {
|
||||
/**
|
||||
* The document that will be saved.
|
||||
*/
|
||||
document: TextDocument;
|
||||
readonly document: TextDocument;
|
||||
|
||||
/**
|
||||
* The reason why save was triggered.
|
||||
*/
|
||||
reason: TextDocumentSaveReason;
|
||||
readonly reason: TextDocumentSaveReason;
|
||||
|
||||
/**
|
||||
* Allows to pause the event loop and to apply [pre-save-edits](#TextEdit).
|
||||
@@ -7415,12 +7556,12 @@ declare module 'vscode' {
|
||||
/**
|
||||
* Added workspace folders.
|
||||
*/
|
||||
readonly added: WorkspaceFolder[];
|
||||
readonly added: ReadonlyArray<WorkspaceFolder>;
|
||||
|
||||
/**
|
||||
* Removed workspace folders.
|
||||
*/
|
||||
readonly removed: WorkspaceFolder[];
|
||||
readonly removed: ReadonlyArray<WorkspaceFolder>;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -7460,6 +7601,14 @@ declare module 'vscode' {
|
||||
*/
|
||||
export namespace workspace {
|
||||
|
||||
/**
|
||||
* A [file system](#FileSystem) instance that allows to interact with local and remote
|
||||
* files, e.g. `vscode.workspace.fs.readDirectory(someUri)` allows to retrieve all entries
|
||||
* of a directory or `vscode.workspace.fs.stat(anotherUri)` returns the meta data for a
|
||||
* file.
|
||||
*/
|
||||
export const fs: FileSystem;
|
||||
|
||||
/**
|
||||
* ~~The folder that is open in the editor. `undefined` when no folder
|
||||
* has been opened.~~
|
||||
@@ -7480,6 +7629,37 @@ declare module 'vscode' {
|
||||
*/
|
||||
export const name: string | undefined;
|
||||
|
||||
/**
|
||||
* The location of the workspace file, for example:
|
||||
*
|
||||
* `file:///Users/name/Development/myProject.code-workspace`
|
||||
*
|
||||
* or
|
||||
*
|
||||
* `untitled:1555503116870`
|
||||
*
|
||||
* for a workspace that is untitled and not yet saved.
|
||||
*
|
||||
* Depending on the workspace that is opened, the value will be:
|
||||
* * `undefined` when no workspace or a single folder is opened
|
||||
* * the path of the workspace file as `Uri` otherwise. if the workspace
|
||||
* is untitled, the returned URI will use the `untitled:` scheme
|
||||
*
|
||||
* The location can e.g. be used with the `vscode.openFolder` command to
|
||||
* open the workspace again after it has been closed.
|
||||
*
|
||||
* **Example:**
|
||||
* ```typescript
|
||||
* vscode.commands.executeCommand('vscode.openFolder', uriOfWorkspace);
|
||||
* ```
|
||||
*
|
||||
* **Note:** it is not advised to use `workspace.workspaceFile` to write
|
||||
* configuration data into the file. You can use `workspace.getConfiguration().update()`
|
||||
* for that purpose which will work both when a single folder is opened as
|
||||
* well as an untitled or saved workspace.
|
||||
*/
|
||||
export const workspaceFile: Uri | undefined;
|
||||
|
||||
/**
|
||||
* An event that is emitted when a workspace folder is added or removed.
|
||||
*/
|
||||
@@ -8417,9 +8597,9 @@ declare module 'vscode' {
|
||||
/**
|
||||
* Creates a new [source control](#SourceControl) instance.
|
||||
*
|
||||
* @param id An `id` for the source control. Something short, eg: `git`.
|
||||
* @param label A human-readable string for the source control. Eg: `Git`.
|
||||
* @param rootUri An optional Uri of the root of the source control. Eg: `Uri.parse(workspaceRoot)`.
|
||||
* @param id An `id` for the source control. Something short, e.g.: `git`.
|
||||
* @param label A human-readable string for the source control. E.g.: `Git`.
|
||||
* @param rootUri An optional Uri of the root of the source control. E.g.: `Uri.parse(workspaceRoot)`.
|
||||
* @return An instance of [source control](#SourceControl).
|
||||
*/
|
||||
export function createSourceControl(id: string, label: string, rootUri?: Uri): SourceControl;
|
||||
@@ -8496,17 +8676,17 @@ declare module 'vscode' {
|
||||
/**
|
||||
* The [debug session](#DebugSession) for which the custom event was received.
|
||||
*/
|
||||
session: DebugSession;
|
||||
readonly session: DebugSession;
|
||||
|
||||
/**
|
||||
* Type of event.
|
||||
*/
|
||||
event: string;
|
||||
readonly event: string;
|
||||
|
||||
/**
|
||||
* Event specific information.
|
||||
*/
|
||||
body?: any;
|
||||
readonly body?: any;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -8703,17 +8883,17 @@ declare module 'vscode' {
|
||||
/**
|
||||
* Added breakpoints.
|
||||
*/
|
||||
readonly added: Breakpoint[];
|
||||
readonly added: ReadonlyArray<Breakpoint>;
|
||||
|
||||
/**
|
||||
* Removed breakpoints.
|
||||
*/
|
||||
readonly removed: Breakpoint[];
|
||||
readonly removed: ReadonlyArray<Breakpoint>;
|
||||
|
||||
/**
|
||||
* Changed breakpoints.
|
||||
*/
|
||||
readonly changed: Breakpoint[];
|
||||
readonly changed: ReadonlyArray<Breakpoint>;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -8935,7 +9115,7 @@ declare module 'vscode' {
|
||||
/**
|
||||
* All extensions currently known to the system.
|
||||
*/
|
||||
export let all: Extension<any>[];
|
||||
export const all: ReadonlyArray<Extension<any>>;
|
||||
|
||||
/**
|
||||
* An event which fires when `extensions.all` changes. This can happen when extensions are
|
||||
@@ -8983,7 +9163,7 @@ declare module 'vscode' {
|
||||
/**
|
||||
* The uri of the document the thread has been created on.
|
||||
*/
|
||||
readonly resource: Uri;
|
||||
readonly uri: Uri;
|
||||
|
||||
/**
|
||||
* The range the comment thread is located within the document. The thread icon will be shown
|
||||
@@ -9050,6 +9230,31 @@ declare module 'vscode' {
|
||||
iconPath?: Uri;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reactions of a [comment](#Comment)
|
||||
*/
|
||||
export interface CommentReaction {
|
||||
/**
|
||||
* The human-readable label for the reaction
|
||||
*/
|
||||
readonly label: string;
|
||||
|
||||
/**
|
||||
* Icon for the reaction shown in UI.
|
||||
*/
|
||||
readonly iconPath: string | Uri;
|
||||
|
||||
/**
|
||||
* The number of users who have reacted to this reaction
|
||||
*/
|
||||
readonly count: number;
|
||||
|
||||
/**
|
||||
* Whether the [author](CommentAuthorInformation) of the comment has reacted to this reaction
|
||||
*/
|
||||
readonly authorHasReacted: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* A comment is displayed within the editor or the Comments Panel, depending on how it is provided.
|
||||
*/
|
||||
@@ -9073,7 +9278,7 @@ declare module 'vscode' {
|
||||
* Context value of the comment. This can be used to contribute comment specific actions.
|
||||
* For example, a comment is given a context value as `editable`. When contributing actions to `comments/comment/title`
|
||||
* using `menus` extension point, you can specify context value for key `comment` in `when` expression like `comment == editable`.
|
||||
* ```
|
||||
* ```json
|
||||
* "contributes": {
|
||||
* "menus": {
|
||||
* "comments/comment/title": [
|
||||
@@ -9089,6 +9294,11 @@ declare module 'vscode' {
|
||||
*/
|
||||
contextValue?: string;
|
||||
|
||||
/**
|
||||
* Optional reactions of the [comment](#Comment)
|
||||
*/
|
||||
reactions?: CommentReaction[];
|
||||
|
||||
/**
|
||||
* Optional label describing the [Comment](#Comment)
|
||||
* Label will be rendered next to authorName if exists.
|
||||
@@ -9097,7 +9307,7 @@ declare module 'vscode' {
|
||||
}
|
||||
|
||||
/**
|
||||
* Command argument for actions registered in `comments/commentThread/actions`.
|
||||
* Command argument for actions registered in `comments/commentThread/context`.
|
||||
*/
|
||||
export interface CommentReply {
|
||||
/**
|
||||
@@ -9147,12 +9357,17 @@ declare module 'vscode' {
|
||||
* Create a [comment thread](#CommentThread). The comment thread will be displayed in visible text editors (if the resource matches)
|
||||
* and Comments Panel once created.
|
||||
*
|
||||
* @param resource The uri of the document the thread has been created on.
|
||||
* @param uri The uri of the document the thread has been created on.
|
||||
* @param range The range the comment thread is located within the document.
|
||||
* @param comments The ordered comments of the thread.
|
||||
*/
|
||||
createCommentThread(uri: Uri, range: Range, comments: Comment[]): CommentThread;
|
||||
|
||||
/**
|
||||
* Optional reaction handler for creating and deleting reactions on a [comment](#Comment).
|
||||
*/
|
||||
reactionHandler?: (comment: Comment, reaction: CommentReaction) => Promise<void>;
|
||||
|
||||
/**
|
||||
* Dispose this comment controller.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user