Skip to content

Commit 8473c0d

Browse files
add missing non-null assertion operator
1 parent ff67d21 commit 8473c0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/academy/switching_to_typescript/unknown_and_type_assertions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ TypeScript will yell at you when trying to compile this code, stating that **Obj
105105
```TypeScript
106106
let job: undefined | string;
107107

108-
const chars = job.split('');
108+
const chars = job!.split('');
109109
```
110110

111111
This operator is called the [non-null assertion operator](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#non-null-assertion-operator-postfix-).

0 commit comments

Comments
 (0)