Closed huilensolis closed 8 months ago
1.0.0
Linux 6.5.5-arch1-1 x86_64
async function test(){ const a = await fetch('/asdfas') return Promise.resolve({test: a}) } function run(){ const { test } = await test() }
a more descriptive message, something like what the linters do.
"'await' expressions are only allowed within async functions and at the top levels of modules"
error: Expected ";" but found "test" const {test} = await test() ^ /home/huilensolis/test.js:7:24 137 error: Expected "=>" but found "}" } ^ /home/huilensolis/test.js:8:1 144
No response
Duplicate of #108
What version of Bun is running?
1.0.0
What platform is your computer?
Linux 6.5.5-arch1-1 x86_64
What steps can reproduce the bug?
What is the expected behavior?
a more descriptive message, something like what the linters do.
"'await' expressions are only allowed within async functions and at the top levels of modules"
What do you see instead?
Additional information
No response