Skip to content

Commit fc145f5

Browse files
authored
Update strictNullChecks.md
1 parent 81a5e3f commit fc145f5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

docs/options/strictNullChecks.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,4 @@ function processEntity(e?: Entity) {
6161
let b = e!.name; // Assert that e is non-null. This allows you to access name
6262
}
6363
```
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

Comments
 (0)