Top-level 'await' is not recognized by extension
See original GitHub issueI have installed latest Deno extenstion version from VSCode marketplace and everything is ok except the top-level await
statements. It seems that extension just does not recognize them:
Output of deno --version
command:
❯ deno --version
deno 1.0.0
v8 8.4.300
typescript 3.9.2
VSCode version:
❯ code --version
1.42.1
c47d83b293181d9be64f27ff093689e8e7aed054
x64
OS: macOS Mojave 10.14.6 18G2022 x86_6
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
await Error at Top Level Module in Chrome Extension ...
Chrome forbids top-level await in a service worker intentionally. It can't be circumvented, so you'll have to use an async function. – wOxxOm....
Read more >Top-level await is available in Node.js modules - Stefan Judis
mjs file extension to use it in my scripts. Renaming a script file from js to mjs is quickly done and is not...
Read more >How to use top-level await in JavaScript - Flavio Copes
Learn how to use this new feature currently available in v8.
Read more >How to use top-level await in Node.js - YouTube
This is a video about top-level await in Node.js. Top-level await is available in ECMAscript modules in Node.js. You can use it in...
Read more >top level await expressions are only allowed
To solve the error "Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext'", use the await keyword...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m seeing
ts(1378)
instead ofts(1308)
. Not sure if what I’m getting is directly related to this issue or not.Here are the steps I followed:
.vscode/settings.json
with following entryHere are the version details:
VSCode is also using TypeScript v3.9.7
Should be resolved in version 3.x of the extension.