This is perfectly fine:

```js
this.foo?.bar?.setBaz(123)
```

but this is not:

```js
this.foo?.bar?.baz = 123
```

Why is that not allowed, but function calls are?

I find myself often wanting to do assignments like that. When I am
auto-completing things in VS Code (TypeScript), it automatically and
awesomely inserts the `?` characters, only to fail once I write the
assignment part.

#!/JoePea
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to