Key options:
target— emitted JS versionmodule— ESM vs CommonJSstrict— enables strict family flagsinclude/exclude— which files compile
Starter template
{
"compilerOptions": {
"target": "ES2020",
"module": "ESNext",
"strict": true,
"skipLibCheck": true,
"moduleResolution": "bundler"
},
"include": ["src"]
}
Self-check
- What does
includecontrol versusfiles?
Tip: Check include/exclude when files mysteriously lack type checking.