TypeScript
noImplicitAny
noImplicitAny prevents implicit any when types cannot be inferred.
Example
function sum(a, b) {
return a + b;
}With noImplicitAny: true, this becomes an error.
function sumTyped(a: number, b: number) {
return a + b;
}Notes
- Catches untyped parameters and values.
- Best used with
strict: true.