TypeScript Installation and Configuration Quiz
A 30-question TypeScript quiz covering installation, project setup, tsconfig.json fundamentals, compiler options, integrating build tools, project organization patterns, and how to run and compile TypeScript effectively.
Question 1
Which command installs TypeScript globally using npm?
Question 2
What does running `tsc -v` show?
Question 3
What is the benefit of installing TypeScript locally in a project?
Question 4
What does this command do?
npm install --save-dev typescriptQuestion 5
Which command initializes a default tsconfig.json file?
Question 6
Which directory is commonly used to store compiled JavaScript output?
Question 7
What happens when you run this command?
tscQuestion 8
Which folder usually stores source TypeScript code?
Question 9
What is the purpose of tsconfig.json?
Question 10
What does this configuration mean?
"compilerOptions": {
"target": "ES2017"
}Question 11
Which field tells TypeScript where to output compiled JS files?
Question 12
Which field restricts which files TypeScript compiles?
Question 13
What does the 'strict' option enable?
Question 14
What does this compiler option do?
"compilerOptions": {
"noEmit": true
}Question 15
What does 'module' in tsconfig.json specify?
Question 16
What does this option enforce?
"compilerOptions": {
"rootDir": "src"
}Question 17
Which tool commonly bundles TypeScript using a loader?
Question 18
What is this command used for?
npx tsc -wQuestion 19
Which tool directly transpiles TypeScript without full type checking?
Question 20
Why is separating src and dist directories recommended?
Question 21
What is a recommended pattern for larger TypeScript projects?
Question 22
What does this script do?
"scripts": {
"build": "tsc"
}Question 23
Which command executes a compiled JavaScript file?
Question 24
What does this command do?
npx ts-node index.tsQuestion 25
Which compiler option controls incremental compilation?
Question 26
Why use source maps in TypeScript projects?
Question 27
What does this tsconfig option do?
"compilerOptions": {
"sourceMap": true
}Question 28
Which command compiles only a specific file, ignoring tsconfig.json?
Question 29
What does watch mode improve during development?
Question 30
What does the TypeScript compiler output when there are no errors?
