Enable noImplicitReturns option for vscode extension

This commit is contained in:
Tetsuharu OHZEKI 2019-12-12 00:49:54 +09:00
parent b21bb44c8d
commit 0e9cabab3f
5 changed files with 20 additions and 12 deletions

View file

@ -73,7 +73,7 @@ function createTask(spec: Runnable): vscode.Task {
}
let prevRunnable: RunnableQuickPick | undefined;
export async function handle() {
export async function handle(): Promise<vscode.TaskExecution | undefined> {
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) {