- From: Domenic Denicola <notifications@github.com>
- Date: Tue, 25 Jun 2024 19:44:53 -0700
- To: whatwg/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/webidl/issues/1414@github.com>
### 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: - Observable array types are only allowed on regular attributes on interfaces - After #1413, frozen array types are only allowed on regular or static 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? -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/webidl/issues/1414 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/webidl/issues/1414@github.com>
Received on Wednesday, 26 June 2024 02:44:56 UTC