To clarify from above; it's almost certainly not going to be web compatible
to change how `void` works in expressions, so if another alternative isn't
viable, then it's kind of a nonstarter.

A separate question is, how would `String` cover strings across realms,
considering that `'abc' instanceof String` already returns `false` even in
the same realm?

On Sun, Jun 3, 2018 at 10:46 AM, YU HengChun <achun....@qq.com> wrote:

> > ```js
> > function CustomNumber(x = void([Number, mod.BigNumber]) || 42) {
> >   // ...
> > }
> > ```
> >
> > which is arguably awkward.
>
> Easy, change the word well.
>
> ```js
> function CustomNumber(x = typeof([Number, mod.BigNumber]) && 42) {
>   // ...
> }
> ```
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to