TS Non-Null Assertion Operator

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2022 Jan 11 6:15
Editor
Edited
Edited
2025 Oct 23 17:6
Refs
Refs

Suffix Exclamation Mark after Variable

adding this operator causes the compiler to ignore undefined or null types
we should be extremely careful when using it, as it can lead to unexpected behaviour if the value is actually undefined
 
 
 
Exclamation Mark In TypeScript
If you are using TypeScript, you might have noticed an Exclamation Mark (!) operator that does some kind of magic and makes your compiler ignore possible errors. Let's learn what the purpose of this operator is and how it can be a useful addition to our projects.
Exclamation Mark In TypeScript
 
 

Recommendations