strict (compiler option)

The strict compiler option, which turns on a family of stronger checks such as strictNullChecks and noImplicitAny in one setting.

In more detail

Every new project should enable it, and since TypeScript 6.0 it is on by default. It makes null and undefined explicit, forbids silently untyped parameters and tightens function checks. Not to be confused with JavaScript's "use strict" directive, which is a different run time mode.

Example

"strict": true

Related terms

Taught in

References