js-types icon indicating copy to clipboard operation
js-types copied to clipboard

Proposal for adding type reflection to the JS API

Results 17 js-types issues
Sort by recently updated
recently updated
newest added

The PR is supposed to address issues #20 and #30 by replacing `funcref` and `externref` with more detailed `{ref: HeapType, nullable: bool}` dictionary. `WebAssembly.Function.type()` will return `{ref: 'any', nullable}` for...

TLDR: `bind` should be overrided for WebAssembly.Function to return regular JS Function. According to the proposal `WebAssembly.Function` is a subclass of regular JS Function and `Function.prototype` in its prototype chain....

At the moment, the JS API [specifies](https://webassembly.github.io/spec/js-api/index.html#run-a-host-function) that, when calling a host function, `undefined` is always passed as the receiver. With the addition of `externref`, it would otherwise be possible...

In response to https://github.com/w3ctag/design-reviews/issues/532 ```js function print(...args) { for (let x of args) console.log(x + "\n") } let table = new Table({element: "anyfunc", minimum: 10}); let print_i32 = new WebAssembly.Function({parameters:...

The snippet ```webidl interface Function : global.Function { static FunctionType type(Function func); }; ``` is not valid WebIDL, and I don't see a clear way to make it so. Note...

Instead of defining JSFunction via `callback JSFunction...` approach in-place, I added a reference to TC39 spec in the same fashion as `ArrayBuffer` interface is introduced.

Relanding port of V8 tests to extend coverage.

How will this evolve with (notably) the typed function references proposal? Unless I've misunderstood that proposal, it is possible for the new function types to be self-referential, leading to a...

This clears up two issues in the overview document surrounding the usage of `WebAssembly.Function`, these are: * What behaviour should occur if you pass a `WebAssembly.Function` object to the `WebAssembly.Function`...