Existential Operator / Null Propagation Operator
tingan87 at gmail.com
Wed Aug 19 06:26:56 UTC 2015
One thing to keep in mind is that with prefix operator `?a.b` will also let
people move back and forth with their caret. Since most people type the
identifier first and then the operator. So they type `a` first and the move
the caret in front of `a` and type `?` and then move the caret back to the
last position and then type `.b`. This has been a big problem in typing
type assertions in TS which had a prefix operator. They later introduced
the `as` operator which is a postfix operator.
What about `a!?.b` since semantically the symbol `!` has a meaning of
non-nullable in JSDoc. So the semantics of `a!?.` is `is it not null
then the accessor ...`.
Or just `a!.b`?
: Non-nullable type — http://usejsdoc.org/tags-type.html
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss