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 }}
This repository was archived by the owner on Apr 25, 2025. It is now read-only.
On the web, externref can hold any JS value and funcref can hold exported wasm functions. In this proposal, anyref is added as the super type of externref and funcref.
Is there any difference between anyref and externref when used in a param of an exported wasm called by JS? Or generally in ToWebAssemblyValue [1]. It seems like if externref can accept any JS value, then anyref must as well as the super type of externref.
One oddity of this is that funcref and externref have overlapping sets of values. externref is any JS value and funcref is any exported wasm function (which is a JS value). So the subtypes of anyref aren't disjoint over the values they accept.
I haven't been able to write any code that would break with either of these facts, but I just want to make sure this is intentional and how I should read the proposal.