TypeScript | Type Annotation and Inference in TypeScript | Question10

Last Updated :
Discuss
Comments

What happens when you use strictNullChecks in TypeScript?

null and undefined are treated as normal values

null and undefined cannot be assigned to variables of other types unless explicitly allowed

TypeScript ignores null values in type checking

null and undefined behave like numbers

Share your thoughts in the comments