All quizzesEasy
tsconfig & Modules — Series 3
Preview — 3 of 10 questions
Which options are in effect for the child project?
javascript
// tsconfig.base.json
{ "compilerOptions": { "strict": true, "target": "ES2020", "declaration": true } }
// tsconfig.json
{
"extends": "./tsconfig.base.json",
"compilerOptions": { "target": "ES2022" }
}AOnly target: "ES2022" — extends replaces the whole compilerOptions block
Bstrict: true, target: "ES2022", declaration: true — options are merged key by key, and the child's value wins on conflicts
Cstrict: true, target: "ES2020", declaration: true — the base always takes precedence
DA compile-time error — target may not be redefined in an extending config
javascript
{
"files": ["src/main.ts"],
"exclude": ["src/**/*"]
}ANo files are compiled — exclude removes src/main.ts
BEvery file under src/ is compiled — files is only a hint
CA config error — files and exclude are mutually exclusive
Dsrc/main.ts is compiled — exclude only filters include, never the explicit files list
javascript
tsc --noEmitAType-checks the project and writes no output files
BSkips type checking and emits JavaScript only
CEmits declaration files but no JavaScript
DEmits nothing and skips checking, so it always exits 0
Sign up free to play
Answer all 10 questions (7 more), see explanations for every answer, and track your score.