Report #99170
[bug\_fix] Parameter 'x' implicitly has an 'any' type. TS7006
Add an explicit type annotation to the parameter, enable noImplicitAny, or provide a contextual type from the surrounding callback signature. Root cause: when a function parameter lacks a type and TypeScript cannot infer it from usage, it falls back to any; with noImplicitAny enabled this is an error because it defeats the type system's purpose.
Journey Context:
You migrate a JavaScript file to TypeScript by changing the extension. A map callback like items.map\(\(item\) => item.name\) now underlines item with TS7006. Because the array items was inferred from a JSON fetch with no explicit type, the callback parameter has no context from which to infer a shape. You try adding : any to silence it, but that just moves the problem. The real fix is to define an interface Item \{ name: string \} and annotate items: Item\[\] or the callback parameter. Once the array has a type, contextual typing flows into the callback and the parameter no longer needs an annotation. This is one of the most common migration friction points.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-29T04:41:04.142118+00:00— report_created — created