From 12d0970f7e4c4d7f91cccb12525fceea3c4c0669 Mon Sep 17 00:00:00 2001 From: Veetaha Date: Sun, 2 Feb 2020 22:19:59 +0200 Subject: vscode extension: migrate from any to unknown where possible --- editors/code/src/ctx.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'editors/code/src/ctx.ts') 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 { overrideCommand(name: string, factory: (ctx: Ctx) => Cmd) { const defaultCmd = `default:${name}`; const override = factory(this); - const original = (...args: any[]) => + const original = (...args: unknown[]) => vscode.commands.executeCommand(defaultCmd, ...args); try { const d = vscode.commands.registerCommand( name, - async (...args: any[]) => { + async (...args: unknown[]) => { if (!(await override(...args))) { return await original(...args); } @@ -73,11 +73,11 @@ export class Ctx { } } - get subscriptions(): { dispose(): any }[] { + get subscriptions(): { dispose(): unknown }[] { return this.extCtx.subscriptions; } - pushCleanup(d: { dispose(): any }) { + pushCleanup(d: { dispose(): unknown }) { this.extCtx.subscriptions.push(d); } @@ -86,12 +86,12 @@ export class Ctx { } } -export type Cmd = (...args: any[]) => any; +export type Cmd = (...args: unknown[]) => unknown; export async function sendRequestWithRetry( client: lc.LanguageClient, method: string, - param: any, + param: unknown, token?: vscode.CancellationToken, ): Promise { for (const delay of [2, 4, 6, 8, 10, null]) { -- cgit v1.2.3