Summary
The WebAssembly.Module interface is currently emitted as an empty interface, making it structurally compatible with any object in TypeScript
Expected vs. Actual Behavior
const abc: WebAssembly.Module = 0;
I would expect the above to be a compilation error.
But WebAssembly.Module gets emitted as an empty interface allowing all assignments.
Playground Link
https://www.typescriptlang.org/play/?#code/MYewdgzgLgBAhgI2ALhgdQKYIIIQhgWwQBsBPAOgFkQATAV2IxgF4YAGAbiA
Browser Support
Have Tried The Latest Releases
Additional Context
Do we need to make WebAssembly.Module nominally typed? 🫣
I'm not aware of any other interfaces with only constructors/static methods but no instance members