You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/options/strictNullChecks.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -61,3 +61,4 @@ function processEntity(e?: Entity) {
61
61
let b =e!.name; // Assert that e is non-null. This allows you to access name
62
62
}
63
63
```
64
+
> Note that it is just an assertion, and just like type assertions *you are responsible* for making sure the value is not null. A null assertion is essentially you telling the compiler "I know its not null so let me use it as though its not null".
0 commit comments