>From a technical point of view, using ![ instead of ?.[ may work only if you 
>forbid a line terminator before the !

I tried this on [TS 
Playground](http://www.typescriptlang.org/play/#src=var%20a%20%3D%20%7B%7D%3B%0D%0A%0D%0Aa!%5B3%5D%3B%0D%0Aa%0D%0A!%5B3%5D%3B)
 and it interestingly changes behavior when there is a line break before `!`.

```js
var a = {};

a![3]; // works as a[3]
a
![3]; // preserves original behavior
```

>but many languages (e.g. Swift, Kotlin, and I think TypeScript 2.0) use it in 
>the inverse direction: non-null assertion for nullable types.

Right. :/
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to