Complete the code to specify the root directory for TypeScript source files.
{
"compilerOptions": {
"rootDir": "[1]"
}
}rootDir to the output folder like dist instead of the source folder.The rootDir option tells TypeScript where your source files are located. Usually, this is the src folder.
Complete the code to enable strict type checking in the TypeScript compiler.
{
"compilerOptions": {
"strict": [1]
}
}"true" or "false".The strict option is a boolean that enables strict type checking. It should be set to true without quotes.
Fix the error in the code by completing the module resolution strategy.
{
"compilerOptions": {
"moduleResolution": "[1]"
}
}"Node" or "Classic" which cause errors.The moduleResolution option is case-sensitive and should be "node" in lowercase to use Node.js style resolution.
Fill both blanks to configure the output directory and enable source maps.
{
"compilerOptions": {
"outDir": "[1]",
"sourceMap": [2]
}
}sourceMap to a string instead of a boolean.build instead of dist if the project expects dist.The outDir option sets the folder for compiled JavaScript files, commonly dist. The sourceMap option enables source maps when set to true.
Fill all three blanks to configure target, module, and allowJs options.
{
"compilerOptions": {
"target": "[1]",
"module": "[2]",
"allowJs": [3]
}
}es5 instead of uppercase ES5 for target."true" or "false".The target option sets the JavaScript version output, commonly ES5. The module option defines the module system, often commonjs. The allowJs option enables compiling JavaScript files when set to true.