Re: [heycam/webidl] undefined can't be a member of a union type (#962)

Okay, chasing the blame backwards, dictionary types are excluded from nullability *specifically* because the spec has always considered JS `null` to be capable of satisfying a dictionary type. (I presume this is legacy behavior from it being hard, in IDL-ese, to talk about JS `undefined`.)

But I don't want that to be the case for `undefined`, right? Like, an attribute defined with `(undefined or FooInterface) attr;` should throw if you try to assign `null` to it, right? If so, then I *do* want to allow `undefined` to be nullable.

Or do we *want* to maintain the old IDL idea that JS's `null` and `undefined` were the same value?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/962#issuecomment-797846002

Received on Saturday, 13 March 2021 01:53:32 UTC