外觀
禁止額外的非空斷言。
TypeScript 中的 ! 非空斷言運算子用於斷言值的類型不包含 null 或 undefined。在單一值上多次使用該運算子不會有任何作用。
!
const foo: { bar: number } | null = null; const bar = foo!!!.bar;