aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/commands/runnables.ts
diff options
context:
space:
mode:
authorTetsuharu OHZEKI <[email protected]>2019-12-11 15:49:54 +0000
committerTetsuharu OHZEKI <[email protected]>2019-12-11 16:11:53 +0000
commit0e9cabab3fb4c15fb1b88e62a35ccf1ea52ef853 (patch)
treedf588536859ad9c0605492c75a8ffce5d3977df6 /editors/code/src/commands/runnables.ts
parentb21bb44c8dcd43e9e42ef7e3d752dd550e6505ad (diff)
Enable noImplicitReturns option for vscode extension
Diffstat (limited to 'editors/code/src/commands/runnables.ts')
-rw-r--r--editors/code/src/commands/runnables.ts14
1 files changed, 8 insertions, 6 deletions
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 {
73} 73}
74 74
75let prevRunnable: RunnableQuickPick | undefined; 75let prevRunnable: RunnableQuickPick | undefined;
76export async function handle() { 76export async function handle(): Promise<vscode.TaskExecution | undefined> {
77 const editor = vscode.window.activeTextEditor; 77 const editor = vscode.window.activeTextEditor;
78 if (editor == null || editor.document.languageId !== 'rust') { 78 if (editor == null || editor.document.languageId !== 'rust') {
79 return; 79 return;
@@ -105,12 +105,14 @@ export async function handle() {
105 items.push(new RunnableQuickPick(r)); 105 items.push(new RunnableQuickPick(r));
106 } 106 }
107 const item = await vscode.window.showQuickPick(items); 107 const item = await vscode.window.showQuickPick(items);
108 if (item) { 108 if (!item) {
109 item.detail = 'rerun'; 109 return;
110 prevRunnable = item;
111 const task = createTask(item.runnable);
112 return await vscode.tasks.executeTask(task);
113 } 110 }
111
112 item.detail = 'rerun';
113 prevRunnable = item;
114 const task = createTask(item.runnable);
115 return await vscode.tasks.executeTask(task);
114} 116}
115 117
116export async function handleSingle(runnable: Runnable) { 118export async function handleSingle(runnable: Runnable) {