tsconfig and Strict Mode
tsconfig.json is the control panel for the TypeScript compiler.
Like a settings menu for how strict and how to build.
It decides which files to include.
Turning on strict is the best default for new projects.
A minimal useful config
Put compilerOptions in the file.
compilerOptions means the knobs for the compiler.
target picks what JavaScript version to emit.
Emit means the JavaScript files that come out.
What strict turns on
Strict mode is a bundle of checks.
It includes strictNullChecks and noImplicitAny.
strictNullChecks means null and undefined need handling.
noImplicitAny means you must type things TypeScript cannot guess.
Also strictFunctionTypes and more.
noUncheckedIndexedAccess
Optional but popular.
Array and object index reads become T | undefined.
That matches reality. The index might be missing.
You must check before you use the value.
include, exclude, and paths
include lists folders and files to check.
exclude lists what to skip.
Path aliases map imports like @/utils to folders.
Set them in both TypeScript and your bundler.
A bundler packs files for the browser or server.
Project references
Larger monorepos use project references.
A monorepo is many packages in one big repo.
Each package can have its own tsconfig.
References tell TypeScript how they depend on each other.
Start with strict: true. Loosen flags only when you have a clear, written reason.
Test yourself
Three quick questions made just for this lesson. Earn 10 XP per correct answer.