-
Notifications
You must be signed in to change notification settings - Fork 870
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove Top Level Await #609
Comments
To parse Bash code, curlconverter uses tree-sitter with tree-sitter-bash, which is a C library that is compiled into WASM for the browser. Loading these WASM files (there's two) has to be async for the network request or for We could make all of curlconverter's |
Hello 😉 I have a similar limitation. The import { initWasmSupport, toJsonString } from 'curlconverter';
// Below this line, everything is ready to use any curl converter function through wasm
await initWasmSupport();
console.log(toJsonString('curl http://example.com')); I'm not saying it's easy or possible 😛 |
@hsablonniere there should be no top-level |
Top level await makes the module incompatible with frameworks like astro.js and make it so that even using the module in an API route like nextjs.
Workaround for current top level imports.
The text was updated successfully, but these errors were encountered: