From 0e9cabab3fb4c15fb1b88e62a35ccf1ea52ef853 Mon Sep 17 00:00:00 2001 From: Tetsuharu OHZEKI Date: Thu, 12 Dec 2019 00:49:54 +0900 Subject: Enable noImplicitReturns option for vscode extension --- editors/code/src/commands/runnables.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'editors/code/src/commands') diff --git a/editors/code/src/commands/runnables.ts b/editors/code/src/commands/runnables.ts index c81d7ce0f..cf980e257 100644 --- a/editors/code/src/commands/runnables.ts +++ b/editors/code/src/commands/runnables.ts @@ -73,7 +73,7 @@ function createTask(spec: Runnable): vscode.Task { } let prevRunnable: RunnableQuickPick | undefined; -export async function handle() { +export async function handle(): Promise { const editor = vscode.window.activeTextEditor; if (editor == null || editor.document.languageId !== 'rust') { return; @@ -105,12 +105,14 @@ export async function handle() { items.push(new RunnableQuickPick(r)); } const item = await vscode.window.showQuickPick(items); - if (item) { - item.detail = 'rerun'; - prevRunnable = item; - const task = createTask(item.runnable); - return await vscode.tasks.executeTask(task); + if (!item) { + return; } + + item.detail = 'rerun'; + prevRunnable = item; + const task = createTask(item.runnable); + return await vscode.tasks.executeTask(task); } export async function handleSingle(runnable: Runnable) { -- cgit v1.2.3