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
We have various ad-hoc restrictions on different constructs, mostly types and extended attributes, being allowed or disallowed in various places. For example:
Observable array types are only allowed on regular attributes on interfaces
The any type must not be used as a union member type
Nullable types' inner types must not be from a certain list
undefined must not be used as an argument type
sequence types must not be used as attribute or constant types
These restrictions appear in different places, sometimes in the place declaring the type, and sometimes in the place declaring the construct that only accepts a restricted set of types. It would be nice if this was more uniform and easy to understand.
My suggestion is that we make a list of all possible places a type can appear (including ones you might not think of like as the inner type of a promise type or record). Then each type can contain a table listing whether it's allowed in such places. Possibly with asterisks in a given cell if necessary to explain some complexity.
I'm unsure then whether we'd want to include "back references". E.g., in the definition of promise types, we say that they're disallowed as the inner type of a nullable type. Then, in the definition of nullable type, do we also list the allowed or disallowed types? Maybe not?
The text was updated successfully, but these errors were encountered:
What is the issue with the Web IDL Standard?
We have various ad-hoc restrictions on different constructs, mostly types and extended attributes, being allowed or disallowed in various places. For example:
any
type must not be used as a union member typeThese restrictions appear in different places, sometimes in the place declaring the type, and sometimes in the place declaring the construct that only accepts a restricted set of types. It would be nice if this was more uniform and easy to understand.
My suggestion is that we make a list of all possible places a type can appear (including ones you might not think of like as the inner type of a promise type or record). Then each type can contain a table listing whether it's allowed in such places. Possibly with asterisks in a given cell if necessary to explain some complexity.
I'm unsure then whether we'd want to include "back references". E.g., in the definition of promise types, we say that they're disallowed as the inner type of a nullable type. Then, in the definition of nullable type, do we also list the allowed or disallowed types? Maybe not?
The text was updated successfully, but these errors were encountered: