Complete the command to install TypeScript globally using npm.
npm install -g [1]The correct package to install TypeScript globally is typescript. This allows you to use the tsc command anywhere.
Complete the command to check the installed TypeScript compiler version.
tsc [1]The tsc -v or tsc --version command shows the installed TypeScript compiler version.
Fix the error in the command to compile a TypeScript file named app.ts.
tsc [1]The TypeScript compiler expects the source file with the .ts extension. So app.ts is correct.
Fill both blanks to create a tsconfig.json file with strict type checking enabled.
{
"compilerOptions": {
"strict": [1],
"target": "[2]"
}
}Setting "strict": true enables strict type checking. The "target": "ES6" sets the JavaScript version output.
Fill all three blanks to compile TypeScript files in the src folder and output JavaScript files to the dist folder.
tsc --project [1] --outDir [2] --[3]
The --project tsconfig.json tells tsc to use the config file. --outDir dist sets the output folder. --watch makes the compiler watch for changes.