Proposal static type constraints features

YU HengChun achun.shx at qq.com
Sun Jun 3 17:46:50 UTC 2018


> ```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) {
  // ...
}
```




More information about the es-discuss mailing list