TS7006
Parameter 'person' implicitly has an 'any' type.
Broken Code ❌
function greeter(person) {
return `Hello, ${person}`;
}{
"compilerOptions": {
"noImplicitAny": true
}
}Fixed Code ✔️
You have to define the type for the argument named person:
function greeter(person: string) {
return `Hello, ${person}`;
}Alternative, but not recommend:
- Set "noImplicitAny" to
falsein your "tsconfig.json"
