Strict Mode
Question
What does strict: true enable in tsconfig?
Hint
strict enables noImplicitAny, strictNullChecks, strictFunctionTypes, etc.
Explanation
Setting "strict": true in tsconfig.json enables all strict type-checking options simultaneously: noImplicitAny (error on implicit any), strictNullChecks (null/undefined not assignable to other types), strictFunctionTypes (contravariant function parameter checking), strictBindCallApply, strictPropertyInitialization, noImplicitThis, alwaysStrict (emit "use strict"), useUnknownInCatchVariables. Strict mode catches more errors at compile time. It is strongly recommended for all new projects. You can opt out of individual checks while keeping strict true.
Related Resources
Related Lessons
- Strict Mode
Learn strict mode.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.