A tsconfig.json file tells the compiler which files belong to a
project and which checks should be enabled. Create one with
npx tsc --init.
tsconfig.json
tsconfig.json
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"strict": true,
"outDir": "dist"
},
"include": ["src"]
}
Strict checking
Use "strict": true in new projects. It enables a family of
checks that make missing values, unsafe parameters and incomplete object
handling visible. Strict code may require more thought initially, but that is
the point: it makes the program describe what it actually expects.
Did you know my courses are all printer-friendly? This means you can easily export them to PDF or print them for later use.
