From 2fd7af2a62ce0c8acb5daa6b2c179b638318f31a Mon Sep 17 00:00:00 2001 From: Veetaha Date: Sun, 2 Feb 2020 23:23:01 +0200 Subject: vscode: use void where possible --- editors/code/src/ctx.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'editors/code/src/ctx.ts') diff --git a/editors/code/src/ctx.ts b/editors/code/src/ctx.ts index 2d703af58..05d21ae56 100644 --- a/editors/code/src/ctx.ts +++ b/editors/code/src/ctx.ts @@ -1,5 +1,6 @@ import * as vscode from 'vscode'; import * as lc from 'vscode-languageclient'; + import { Config } from './config'; import { createClient } from './client'; @@ -73,11 +74,11 @@ export class Ctx { } } - get subscriptions(): { dispose(): unknown }[] { + get subscriptions(): Disposable[] { return this.extCtx.subscriptions; } - pushCleanup(d: { dispose(): unknown }) { + pushCleanup(d: Disposable) { this.extCtx.subscriptions.push(d); } @@ -86,6 +87,9 @@ export class Ctx { } } +export interface Disposable { + dispose(): void; +} export type Cmd = (...args: any[]) => unknown; export async function sendRequestWithRetry( -- cgit v1.2.3