Proposal static type constraints features
Jordan Harband
ljharb at gmail.com
Sun Jun 3 20:14:07 UTC 2018
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.shx at 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 at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20180603/4472b7d2/attachment.html>
More information about the es-discuss
mailing list