Open
Description
Describe the Bug
The WebAssembly table can hold either externref
or anyfunc
. However, the API in js-sys
uses Function
in its methods, rather than the more permissive JsValue
.
Additionally, functions accepting a second parameter are not reflected, such as the constructor, and the grow
method which can take a second (optional) init parameter.
The API should ideally reflect the JavaScript API and allow for these use cases
Additional Context
Add any other context about the problem here.
MDN documentation: https://developer.mozilla.org/en-US/docs/WebAssembly/JavaScript_interface/Table
Js-sys documentation: https://docs.rs/js-sys/0.3.65/js_sys/WebAssembly/struct.Table.html