TS7006: Parameter 'x' implicitly has an 'any' type

A function parameter has no type annotation and TypeScript can’t infer one, which noImplicitAny (part of strict) forbids.

Seen on: TypeScript

Meaning

Callbacks passed to untyped libraries, event handlers defined separately from where they’re used, and functions in newly converted JS files trigger it.

Common causes

  • Function parameter without annotation in strict mode
  • Callback for a library without type declarations
  • Handler declared separately from its usage (no contextual typing)

⚡ Quick fix

  1. Add a type annotation
  2. Install @types/<library> for contextual types
  3. Use the framework’s event types (React.ChangeEvent<HTMLInputElement>)

Detailed fix by platform

TypeScript

  1. typescript
    function onChange(e: React.ChangeEvent<HTMLInputElement>) { setValue(e.target.value); }
    const total = items.reduce((sum: number, i: Item) => sum + i.price, 0);

How to diagnose

  1. Parameter — Which one?
  2. Types — @types package available?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.