最佳答案
Typescript目前(或有计划)支持?.的安全航行操作符吗
即:
var thing = foo?.bar
// same as:
var thing = (foo) ? foo.bar : null;
此外,这个操作符是否有更常见的名称(很难为谷歌)。