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
{{ message }}
Repository navigation
[Web API type definition issue] Wasm64 Support #2485
WebAssembly.AddressValue should be number | bigint instead of number
Expected vs. Actual Behavior
There are a bunch of APIs relying on the type definition of WebAssembly.AddressValue:
WebAssembly.Memory.grow()
WebAssembly.Table.*
`WebAssembly.MemoryDescriptor.*
WebAssembly.TableDescriptor.*
With Wasm64 memory and tables can be 64-bit, requiring some of the parameters and properties to be bigint instead of number. Currently AddressValue is defines as number, but it should be number | bigint instead.
Maybe the API could be further improved with a separate table or memory type, in which the constructor with the help of WebAssembly.MemoryDescriptor or WebAssembly.TableDescriptor can determine which type we are dealing with.
Playground Link
No response
Browser Support
This API is supported in at least two major browser engines (not two Chromium-based browsers).
Have Tried The Latest Releases
This issue applies to the latest release of TypeScript.
This issue applies to the latest release of @types/web.
Additional Context
This has been explicitly overwritten internally here.
Activity