Skip to main content
Module 7 · Lesson 1 of 213/22 in the course~15 min
Module lessons (1/2)

Configuration with tsconfig.json

Lesson preview5 hands-on exercises readyCourse TypeScript · Module 7 — Configuration and Integration

Master strict, noUncheckedIndexedAccess, exactOptionalPropertyTypes, modern modules and targets.

What you'll learn in this lesson

  • Master what exactly the "strict": true umbrella flag in tsconfig.json enables.
  • Understand the actual bugs prevented by strictNullChecks, noImplicitAny and useUnknownInCatchVariables.
  • Take advantage of the two most useful ultra-strict flags in real projects: noUncheckedIndexedAccess and exactOptionalPropertyTypes.
  • Choose "target", "module" and "moduleResolution" wisely (e.g. bundler vs NodeNext).

Overview

tsconfig.json defines the rules by which tsc parses the project and outputs JavaScript. A weak tsconfig.json lets implicit any and unhandled undefined silently filter through; a strict one turns entire categories of production bugs into immediate red errors in the editor.

Enabling "strict": true activates a whole group of core guarantees in one fell swoop: noImplicitAny, strictNullChecks, strictFunctionTypes, strictBindCallApply, strictPropertyInitialization, and useUnknownInCatchVariables.

Sections covered in this lesson

  1. 1The package "strict": true
  2. 2Extra hardness flag over strict
  3. 3Guided practice
  4. 4Check for understanding
Pro Lesson · Module 7 — Configuration and Integration

Unlock "Configuration with tsconfig.json" and the full Course TypeScript curriculum

Master strict, noUncheckedIndexedAccess, exactOptionalPropertyTypes, modern modules and targets.

Unlock all 5 hands-on exercises in this lesson plus every advanced WebAssembly module with automated checks.

  • Instant access to all advanced modules in Course TypeScript plus 17 more courses
  • Hands-on browser exercises with automated test suites and solutions
  • 14-day money-back guarantee processed via Paddle.com

14-day guarantee · Cancel anytimeModule 1, all 18 interactive games, and cheatsheets are always free.