vscode: use void where possible

This commit is contained in:
Veetaha 2020-02-02 23:23:01 +02:00
parent 5411d65a7f
commit 2fd7af2a62
3 changed files with 9 additions and 5 deletions

View file

@ -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<R>(