1. Concept library
  2. JavaScript & TypeScript
  3. Module 8: Modules and tooling

Concept

tsconfig essentials

tsconfig.json tells the compiler what to check and what to emit. A handful of settings matter most: strict, target, module, moduleResolution, and which files are included.

What a session covers

The tutor works through these with you, in conversation and code. A session ends when you have shown them, not when a video does.

  1. Explain what strict, target, module and moduleResolution each control
  2. Write a tsconfig for a new project with strict on and the right includes
  3. Predict what changes when strict is turned on in an existing project

In practice

A few lines that show tsconfig essentials doing its job.

JSON
{
  "compilerOptions": {
    "strict": true,
    "target": "ES2022",
    "module": "NodeNext",
    "moduleResolution": "NodeNext",
    "noUncheckedIndexedAccess": true,
    "outDir": "dist"
  },
  "include": ["src"]
}

The common mistake

Watch for

Starting a project with strict off to get going faster. Turning it on later means fixing hundreds of errors at once, and in the meantime null checks and implicit any have crept everywhere.

What to know first

Your roadmap puts these before tsconfig essentials, unless you already know them.

How it stays learned

Once a session shows you understand tsconfig essentials, it comes back for review. Each review takes a minute and tells the memory model how well you still know it.

  1. Day 3First recall, while it is fresh
  2. Day 7Second, a week on
  3. Day 18Last, when it has settled

Where it leads

Topics that build on tsconfig essentials.

Previous in the module← ES modules
Next in the moduleDeclaration files →