Recall & Review
beginner
What is the purpose of the
tsconfig.json file in a TypeScript project?The
tsconfig.json file tells the TypeScript compiler how to compile the project. It sets options like which files to include, where to put the output, and how strict the checks should be.Click to reveal answer
beginner
What does the
compilerOptions section in tsconfig.json do?The
compilerOptions section sets rules and settings for the TypeScript compiler, like the target JavaScript version, module system, and whether to allow certain language features.Click to reveal answer
intermediate
What is the effect of setting
"strict": true in tsconfig.json?Setting
"strict": true turns on all strict type-checking options. This helps catch more errors early by making TypeScript more careful about types.Click to reveal answer
beginner
How do you specify which files TypeScript should compile using
tsconfig.json?You can use the
include and exclude arrays to tell TypeScript which files or folders to compile or ignore.Click to reveal answer
beginner
What does the
outDir option do in tsconfig.json?The
outDir option tells TypeScript where to put the compiled JavaScript files after compiling.Click to reveal answer
What is the default file name for the TypeScript configuration file?
✗ Incorrect
The TypeScript compiler looks for a file named
tsconfig.json by default.Which
compilerOptions setting controls the JavaScript version output?✗ Incorrect
The
target option sets the JavaScript version (like ES5, ES6) that TypeScript will output.How do you exclude files from compilation in
tsconfig.json?✗ Incorrect
The
exclude array lists files or folders that TypeScript should not compile.What does setting
"strict": true do?✗ Incorrect
Setting
"strict": true enables all strict type checking features to catch more errors.Where does the
outDir option send compiled files?✗ Incorrect
The
outDir option specifies the folder where compiled JavaScript files are saved.Explain the main purpose of the
tsconfig.json file and name three common options you can set inside it.Think about how TypeScript knows what to compile and how.
You got /4 concepts.
Describe what happens when you set
"strict": true in your tsconfig.json and why it might be helpful.Consider how strict type checking affects your code quality.
You got /3 concepts.