TypeScript · Compiler and project settings
strict
Turns on the strict family, including strictNullChecks and noImplicitAny. Enable it on every new project.
Syntax
"strict": trueExample
Example
// tsconfig.json
{
"compilerOptions": {
"strict": true
}
}Notes
The single highest-value compiler flag. It prevents whole classes of null and implicit any bugs.
More in this group
Learn this in the course
Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.