Add ! (exclamation mark) after a property/variable name.
This feature is called “Non-null assertion operator“, basically it means that
when you add the exclamation mark after a property/value, you are telling
TypeScript that you are certain that value is not null or undefined.
No comments:
Post a Comment