Yeah, it was wrong, I'm currently using like

```js
let ret = { ... ( couldBeNull ? {couldBeNull} : {} ) }
```

Yours is better and the usual idiom a bit hard to understand.

What I'm proposing is something like this

```js
let ret = { couldBeNull? }
```
or if you want a different name for the property

```js
let ret = { bar ?: couldBeNull }
```

It is not like there is no way to do this, there are plenty. But this way could 
make code a bit easier to read.
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to