Target ES2018, fixing issues with await in dance.run.

This commit is contained in:
Grégoire Geis 2021-03-19 17:25:32 +01:00
parent d939ed6d1b
commit b1d408eb10
3 changed files with 4 additions and 4 deletions

View File

@ -271,8 +271,8 @@ export class CommandDescriptor<Input extends InputKind = InputKind> {
}
}
} catch (e) {
console.error(e.stack);
throw e;
vscode.window.showErrorMessage(e.toString());
return;
}
if (flags & (CommandFlags.SwitchToInsertBefore | CommandFlags.SwitchToInsertAfter)) {

View File

@ -21,7 +21,7 @@ registerCommand(Command.run, CommandFlags.IgnoreInHistory, async (_, state) => {
try {
func = AsyncFunction("vscode", "args", code) as any;
} catch (e) {
throw new Error(`cannot parse function body: ${code}`);
throw new Error(`cannot parse function body: ${code}: ${e}`);
}
try {

View File

@ -1,7 +1,7 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es2015",
"target": "ES2018",
"outDir": "out",
"lib": ["es6"],
"sourceMap": true,