The TypeScript documentation details the significance of the noImplicitAny
compiler flag, which is designed to:
Flag errors on expressions and declarations that have an implicit
any
type.
Consider the code snippet below:
let x; // x is implicitly of type `any`, but no error
function foo(y) { // error: parameter 'y' implicitly has an 'any' type.
let z; // z is implicitly of type `any`, but no error
}
Given this scenario, would it not be logical for x
and z
to also be identified as implicitly typed to any
?