Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'editors/code/src/util.ts')
-rw-r--r--editors/code/src/util.ts18
1 files changed, 14 insertions, 4 deletions
diff --git a/editors/code/src/util.ts b/editors/code/src/util.ts
index d7ca6b3557..2f7702baeb 100644
--- a/editors/code/src/util.ts
+++ b/editors/code/src/util.ts
@@ -104,6 +104,7 @@ export function isDocumentInWorkspace(document: RustDocument): boolean {
}
/** Sets ['when'](https://code.visualstudio.com/docs/getstarted/keybindings#_when-clause-contexts) clause contexts */
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function setContextValue(key: string, value: any): Thenable<void> {
return vscode.commands.executeCommand("setContext", key, value);
}
@@ -167,27 +168,35 @@ export class LazyOutputChannel implements vscode.OutputChannel {
append(value: string): void {
this.channel.append(value);
}
+
appendLine(value: string): void {
this.channel.appendLine(value);
}
+
replace(value: string): void {
this.channel.replace(value);
}
+
clear(): void {
if (this._channel) {
this._channel.clear();
}
}
- show(preserveFocus?: boolean): void;
- show(column?: vscode.ViewColumn, preserveFocus?: boolean): void;
- show(column?: any, preserveFocus?: any): void {
- this.channel.show(column, preserveFocus);
+
+ show(columnOrPreserveFocus?: vscode.ViewColumn | boolean, preserveFocus?: boolean): void {
+ if (typeof columnOrPreserveFocus === "boolean") {
+ this.channel.show(columnOrPreserveFocus);
+ } else {
+ this.channel.show(columnOrPreserveFocus, preserveFocus);
+ }
}
+
hide(): void {
if (this._channel) {
this._channel.hide();
}
}
+
dispose(): void {
if (this._channel) {
this._channel.dispose();
@@ -276,6 +285,7 @@ export async function spawnAsync(
stderr: res.stderr,
status: res.status,
};
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
} catch (e: any) {
return {
stdout: e.stdout,