diff options
author | Casper Beyer <caspervonb@pm.me> | 2020-10-02 19:17:47 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-02 13:17:47 +0200 |
commit | 5cd29b37f7946ac05783bae777be8503182a8b8e (patch) | |
tree | edc05600e554133bc0a230de70d53c3a2ff9d243 /cli/repl.rs | |
parent | 6825d7f13d51006967c2638b4433fb582cd6ddbc (diff) |
feat(cli/repl): enable await and let re-declarations (#7784)
This enables `replMode` during evaluations which allows for top level
await and let re-declarations.
Diffstat (limited to 'cli/repl.rs')
-rw-r--r-- | cli/repl.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/cli/repl.rs b/cli/repl.rs index 57e517bd7..1c723ec59 100644 --- a/cli/repl.rs +++ b/cli/repl.rs @@ -126,9 +126,7 @@ pub async fn run( Some(json!({ "expression": format!("'use strict'; void 0;\n{}", &wrapped_line), "contextId": context_id, - // TODO(caspervonb) set repl mode to true to enable const redeclarations and top - // level await - "replMode": false, + "replMode": true, })), ) .await?; @@ -145,9 +143,7 @@ pub async fn run( Some(json!({ "expression": format!("'use strict'; void 0;\n{}", &line), "contextId": context_id, - // TODO(caspervonb) set repl mode to true to enable const redeclarations and top - // level await - "replMode": false, + "replMode": true, })), ) .await? |