aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/ctx.ts
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src/ctx.ts')
-rw-r--r--editors/code/src/ctx.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/editors/code/src/ctx.ts b/editors/code/src/ctx.ts
index 094566d09..aae2c5f90 100644
--- a/editors/code/src/ctx.ts
+++ b/editors/code/src/ctx.ts
@@ -52,12 +52,12 @@ export class Ctx {
52 overrideCommand(name: string, factory: (ctx: Ctx) => Cmd) { 52 overrideCommand(name: string, factory: (ctx: Ctx) => Cmd) {
53 const defaultCmd = `default:${name}`; 53 const defaultCmd = `default:${name}`;
54 const override = factory(this); 54 const override = factory(this);
55 const original = (...args: any[]) => 55 const original = (...args: unknown[]) =>
56 vscode.commands.executeCommand(defaultCmd, ...args); 56 vscode.commands.executeCommand(defaultCmd, ...args);
57 try { 57 try {
58 const d = vscode.commands.registerCommand( 58 const d = vscode.commands.registerCommand(
59 name, 59 name,
60 async (...args: any[]) => { 60 async (...args: unknown[]) => {
61 if (!(await override(...args))) { 61 if (!(await override(...args))) {
62 return await original(...args); 62 return await original(...args);
63 } 63 }
@@ -73,11 +73,11 @@ export class Ctx {
73 } 73 }
74 } 74 }
75 75
76 get subscriptions(): { dispose(): any }[] { 76 get subscriptions(): { dispose(): unknown }[] {
77 return this.extCtx.subscriptions; 77 return this.extCtx.subscriptions;
78 } 78 }
79 79
80 pushCleanup(d: { dispose(): any }) { 80 pushCleanup(d: { dispose(): unknown }) {
81 this.extCtx.subscriptions.push(d); 81 this.extCtx.subscriptions.push(d);
82 } 82 }
83 83
@@ -86,12 +86,12 @@ export class Ctx {
86 } 86 }
87} 87}
88 88
89export type Cmd = (...args: any[]) => any; 89export type Cmd = (...args: unknown[]) => unknown;
90 90
91export async function sendRequestWithRetry<R>( 91export async function sendRequestWithRetry<R>(
92 client: lc.LanguageClient, 92 client: lc.LanguageClient,
93 method: string, 93 method: string,
94 param: any, 94 param: unknown,
95 token?: vscode.CancellationToken, 95 token?: vscode.CancellationToken,
96): Promise<R> { 96): Promise<R> {
97 for (const delay of [2, 4, 6, 8, 10, null]) { 97 for (const delay of [2, 4, 6, 8, 10, null]) {