bytecodealliance / jco

JavaScript toolchain for working with WebAssembly Components
https://bytecodealliance.github.io/jco/
Apache License 2.0
640 stars 63 forks source link

Wrong function type for `instantiate` with `InstantiationMode::Async` #472

Closed wooden-worm closed 3 months ago

wooden-worm commented 4 months ago

The type for getCoreModule should be getCoreModule: (path: string) => WebAssembly.Module | Promise<WebAssembly.Module> instead of just getCoreModule: (path: string) => WebAssembly.Module

https://github.com/bytecodealliance/jco/blob/7f1f11e00a2a61f8bfa80ed1440722e3289a48a4/crates/js-component-bindgen/src/ts_bindgen.rs#L256

guybedford commented 4 months ago

Thanks, yes this seems correct. Would you like to post a PR?