Re: [heycam/webidl] Add bigint type (#525)

Another way to handle both the union and overloading semantics could be to do something similar to what the JS spec does: Call ToNumeric in the ambiguous cases, and make the judgment based on whether a Number or BigInt falls out. This is what we do for most overloaded operators such as `-`. ToNumeric converts strings to Numbers--this is required, for compatibility. Presumably a similar compatibility risk (but perhaps not as serious, depending how much the method is used) would exist if there's an existing method which takes a numeric type and wants to add a bigint overload, or a bigint member to a union.

-- 
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/pull/525#issuecomment-372964767

Received on Wednesday, 14 March 2018 09:56:54 UTC