Problem Statement
Which compiler flag primarily prevents implicit any?
Explanation
Turning on `noImplicitAny` makes the compiler report an error whenever it would infer `any` for a variable or parameter. This helps catch missing annotations and accidental type holes early.
Code Solution
SolutionRead Only
// tsconfig.json
{
"compilerOptions": {
"noImplicitAny": true
}
}
// function sum(a, b) { return a + b } // ❌ errors: implicit any