TypeScript
TypeScript warns that the object is possibly null
TypeScript found code that uses a value as a non-null object even though strict null checking still allows that value to be null.
TypeScript
TypeScript found code that uses a value as a non-null object even though strict null checking still allows that value to be null.
Observed message
error TS2531: Object is possibly 'null'.
Why it happens
How to fix it
Official reference
TypeScript TSConfig: strictNullChecksRelated errors
Explore more