Skip to content

Commit

Permalink
Support annotated types in ES to IDL conversion of union types
Browse files Browse the repository at this point in the history
Closes whatwg#443
  • Loading branch information
tobie committed Sep 19, 2017
1 parent 2b1a990 commit 6985b7c
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -7412,30 +7412,29 @@ that correspond to the union’s [=member types=].
1. If |types| includes a [=record type=], then return the
result of [=converted to an IDL value|converting=]
|V| to that record type.
1. If |types| includes a [=callback interface=]
type, then return the result of
[=converted to an IDL value|converting=]
|V| to that interface type.
1. If |types| includes a [=callback interface=] type,
then return the result of [=converted to an IDL value|converting=] |V|
to that interface type.
1. If |types| includes {{object}}, then return the IDL value
that is a reference to the object |V|.
1. If <a abstract-op>Type</a>(|V|) is Boolean, then:
1. If |types| includes a {{boolean}},
then return the result of [=converted to an IDL value|converting=]
|V| to {{boolean}}.
then return the result of [=converted to an IDL value|converting=] |V| to {{boolean}}.
1. If <a abstract-op>Type</a>(|V|) is Number, then:
1. If |types| includes a [=numeric type=],
then return the result of [=converted to an IDL value|converting=]
|V| to that [=numeric type=].
1. If |types| includes a [=string type=],
then return the result of
[=converted to an IDL value|converting=]
|V| to that type.
1. If |types| includes a [=numeric type=],
then return the result of [=converted to an IDL value|converting=]
|V| to that [=numeric type=].
1. If |types| includes a {{boolean}},
then return the result of [=converted to an IDL value|converting=]
|V| to {{boolean}}.
1. If |types| includes a [=numeric type=], then
return the result of [=converted to an IDL value|converting=] |V|
to that [=numeric type=] or, if that [=numeric type=] is [=annotated type|annotated=],
to its [=annotated type=].
1. If |types| includes a [=string type=], then
return the result of [=converted to an IDL value|converting=] |V|
to that [=string type=] or, if that [=string type=] is [=annotated type|annotated=],
to its [=annotated type=].
1. If |types| includes a [=numeric type=], then
return the result of [=converted to an IDL value|converting=] |V|
to that [=numeric type=] or, if that [=numeric type=] is [=annotated type|annotated=],
to its [=annotated type=].
1. If |types| includes a {{boolean}}, then
return the result of [=converted to an IDL value|converting=] |V| to {{boolean}}.
1. [=ECMAScript/Throw=] a {{ECMAScript/TypeError}}.
</div>

Expand Down

0 comments on commit 6985b7c

Please sign in to comment.