Report #70324
[bug\_fix] Parameter 'event' implicitly has an 'any' type. \(ts\(7006\)\)
Add an explicit type annotation to the parameter, e.g., event: React.FormEvent or event: Event. If the type is truly unknown, prefer unknown and narrow it inside the function. Do not disable noImplicitAny unless you are migrating a legacy codebase incrementally.
Journey Context:
I extracted an inline callback into a named handler and suddenly got TS7006. In the inline version TypeScript had inferred the type from the JSX prop context, but once it was a standalone function there was no contextual type source. I first thought the compiler was broken because the same code worked inline. I added a typed parameter based on the event type and the error cleared. I learned that noImplicitAny forces every parameter without an inference source to be declared, preventing silent any leaks. I also started using unknown for handlers that receive arbitrary data, then narrowing inside.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T00:37:11.237001+00:00— report_created — created