0
0
Typescriptprogramming~5 mins

tsconfig.json Configuration Basics in Typescript - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
Atsconfig.json
Btypescript.json
Cconfig.json
Dtsconfig.js
Which compilerOptions setting controls the JavaScript version output?
Amodule
Btarget
CoutDir
Dstrict
How do you exclude files from compilation in tsconfig.json?
AUsing the <code>skip</code> option
BUsing the <code>ignore</code> array
CUsing the <code>exclude</code> array
DUsing the <code>remove</code> option
What does setting "strict": true do?
AEnables all strict type checking options
BDisables all type checking
COnly checks for syntax errors
DAllows JavaScript files to be compiled
Where does the outDir option send compiled files?
ATo the root folder
BTo the <code>src</code> folder
CTo the <code>node_modules</code> folder
DTo the folder specified by <code>outDir</code>
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.