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
@@ -1666,7 +1664,6 @@ At a high level, the additional coercions would be:
1666
1664
|`flags`| TBD: maybe a [JS Record]? | same as [`dictionary`] of optional `boolean` fields with default values of `false`|
1667
1665
|`enum`| same as [`enum`]| same as [`enum`]|
1668
1666
|`option`| same as [`T?`]| same as [`T?`]|
1669
-
|`union`| same as [`union`]| same as [`union`]|
1670
1667
|`result`| same as `variant`, but coerce a top-level `error` return value to a thrown exception | same as `variant`, but coerce uncaught exceptions to top-level `error` return values |
1671
1668
|`own`, `borrow`| see below | see below |
1672
1669
@@ -1682,7 +1679,7 @@ Notes:
1682
1679
would need to define its own custom binding built from objects. As a sketch,
1683
1680
the JS values accepted by `(variant (case "a" u32) (case "b" string))` could
1684
1681
include `{ tag: 'a', value: 42 }` and `{ tag: 'b', value: "hi" }`.
1685
-
* For `union` and `option`, when Web IDL doesn't support particular type
1682
+
* For `option`, when Web IDL doesn't support particular type
1686
1683
combinations (e.g., `(option (option u32))`), the JS API would fall back to
1687
1684
the JS API of the unspecialized `variant` (e.g.,
1688
1685
`(variant (case "some" (option u32)) (case "none"))`, despecializing only
@@ -1838,7 +1835,6 @@ and will be added over the coming months to complete the MVP proposal:
Copy file name to clipboardExpand all lines: design/mvp/Subtyping.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,6 @@ But roughly speaking:
16
16
|`tuple`|`(tuple T ...) <: T`|
17
17
|`option`|`T <: (option T)`|
18
18
|`result`|`T <: (result T _)`|
19
-
|`union`|`T <: (union ... T ...)`|
20
19
|`own`, `borrow`| none (although resource subtyping may be introduced in the future which would imply handle subtyping) |
21
20
|`func`| parameter names must match in order; contravariant parameter subtyping; superfluous parameters can be ignored in the subtype; `option` parameters can be ignored in the supertype; covariant result subtyping |
22
21
|`component`| all imports in the subtype must be present in the supertype with matching types; all exports in the supertype must be present in the subtype |
0 commit comments