Strict mode, enabled by setting "strict": true in tsconfig.json, turns on a collection of more rigorous type-checking options, including strictNullChecks and several others. Activated in a new project, strict mode catches a far wider range of potential bugs at compile time and is widely recommended as the default for new codebases. A closely related option is "noImplicitAny": true, which causes the compiler to raise an error whenever it would otherwise silently infer the any type, forcing developers to make their intentions explicit and preventing accidental escape hatches in the type system.
Because much of the JavaScript ecosystem was not written with TypeScript in mind, TypeScript uses declaration files with the .d.ts extension to describe the types of values exported by plain JavaScript libraries. A declaration file might contain something as simple as declare function jQuery(): void;. For popular libraries, these declarations are typically published under the @types scope on npm—for example, npm install @types/node adds Node.js type definitions to a project, allowing TypeScript to understand that environment's APIs.
The final piece of project configuration is the JavaScript target version. Setting "target": "ES2020" (or another value such as ES5, ES2015, or ESNext) tells the TypeScript compiler what flavor of JavaScript to emit, balancing compatibility with older runtimes against the ability to use modern language features. Together, the strictness options and the target setting give teams fine-grained control over how their TypeScript code is validated and transpiled into JavaScript that can run in any environment of their choosing.