Problem Statement
Non-null assertion ! after an expression…
Explanation
The `!` tells the compiler “trust me, it’s defined.” It does not add a runtime check. Use sparingly; prefer real narrowing.
Code Solution
SolutionRead Only
declare const el: HTMLElement | null; el!.focus(); // compiles, but may throw at runtime if el is null