You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Starting from @swc/wasm-web v1.7.x, I see this warning message: using deprecated parameters for the initialization function; pass a single object instead when calling __wbg_init without a parameter. Current documentation at https://swc.rs/docs/usage/wasm does not say anything about a required parameter.
When I check code in node_modules\@swc\wasm-web\wasm.d.ts and node_modules\@swc\wasm-web\wasm.js, I see that:
__wbg_init allows module_or_path to be optional. It says Passing InitInput directly is deprecated. With this way of phrasing, I think it means: "If you want to pass InitInput, you need to pass {module_or_path:InitInput} instead of plain InitInput". It does not say anything about skipping module_or_path. This is how I interpret it.
Implementation of __wbg_init shows that if module_or_path is undefined, it will print the warning message.
Can you confirm that skipping module_or_path is also deprecated? If that's the case, I suggest:
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Describe the bug
Starting from
@swc/wasm-web
v1.7.x, I see this warning message:using deprecated parameters for the initialization function; pass a single object instead
when calling__wbg_init
without a parameter. Current documentation at https://swc.rs/docs/usage/wasm does not say anything about a required parameter.When I check code in
node_modules\@swc\wasm-web\wasm.d.ts
andnode_modules\@swc\wasm-web\wasm.js
, I see that:__wbg_init
allowsmodule_or_path
to be optional. It saysPassing InitInput directly is deprecated
. With this way of phrasing, I think it means: "If you want to passInitInput
, you need to pass{module_or_path:InitInput}
instead of plainInitInput
". It does not say anything about skippingmodule_or_path
. This is how I interpret it.__wbg_init
shows that ifmodule_or_path
is undefined, it will print the warning message.Can you confirm that skipping
module_or_path
is also deprecated? If that's the case, I suggest:Input code
No response
Config
No response
Playground link (or link to the minimal reproduction)
https://swc.rs/docs/usage/wasm
SWC Info output
No response
Expected behavior
__wbg_init
does not print the warning message or the TSDoc is updated.Actual behavior
No response
Version
1.7.11
Additional context
No response
The text was updated successfully, but these errors were encountered: