由于TypeScript是强类型的,因此仅使用if () {}检查null和undefined听起来不对.
if () {}
TypeScript是否具有专用功能或语法糖?
typescript
typescript ×1