Appearance
禁止在可选链表达式后使用非空断言
可选链表达式?.在对象为null或undefined时提供undefined。明明已经不是非空的了,再搞个非空断言,就是画蛇添足嘛
?.
null
undefined
不要在可选链表达式后使用非空断言。
foo?.bar!; foo?.bar()!;
foo?.bar; foo?.bar();