How to fix the “parameter implicitly has an ‘any’ type” error in TypeScript?

Sometimes, we want to fix the “parameter implicitly has an ‘any’ type” error in TypeScript.

In this article, we’ll look at how to fix the “parameter implicitly has an ‘any’ type” error in TypeScript.

How to fix the “parameter implicitly has an ‘any’ type” error in TypeScript?

To fix the “parameter implicitly has an ‘any’ type” error in TypeScript, we can set the noImplicitAny option to false in tsconfig.json.

For instance, we write

{
  "noImplicitAny": false
}

to set the noImplicitAny option to false in tsconfig.json.

Now the “parameter implicitly has an ‘any’ type” error shouldn’t be showing for untyped variables.

Conclusion

To fix the “parameter implicitly has an ‘any’ type” error in TypeScript, we can set the noImplicitAny option to false in tsconfig.json.