Skip to content

Commit 0a010de

Browse files
authored
Merge pull request #406 from gabrieldiviricean/fix-missing-non-null-operator
add missing non-null assertion operator
2 parents ad4112e + 8473c0d commit 0a010de

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)