Binding Element 'variable' Implicitly Has An 'any' Type.ts(7031)


Binding element 'category' implicitly has an 'any' type.ts(7031)

Example:

Code

const Category = ({ category, categoryCount }) => {
 

 

Error:

Binding element 'category' implicitly has an 'any' type.ts(7031)

Solution: Add <any> to the passed object argument

const Category = ({ category, categoryCount }: any) => {

 

Solution 2:

Open tsconfig.json and change the following property:

"noImplicitAny": false,

to

"noImplicitAny": true,