Module 4 · Lesson 29 min
The null-forgiving ! and when it's honest
The ! operator is the null-forgiving operator: x! tells the compiler "I know this looks nullable, trust me, it isn't." It's TS's ! non-null assertion, and it carries the same risk: you're overriding the checker, so if you're wrong it's a NullReferenceException at runtime instead of a compile error. Use it only when you genuinely know more than the compiler.
Try it yourself
Recall
When ! is defensible
Name the condition, not just the key.
Give a concrete case where x! is defensible in Fusion code, and one where it would draw a reviewer's objection.