Report #42743
[bug\_fix] Parameter 'x' implicitly has an 'any' type. TS7006
Explicitly annotate the parameter type \(e.g., \`function foo\(x: string\)\`\) or enable \`strictFunctionTypes\` and provide a contextual type. If the function is a callback, define the type of the argument being passed to it.
Journey Context:
You enable \`noImplicitAny: true\` \(or \`strict: true\`\) in an existing JavaScript codebase being migrated to TypeScript. Suddenly, functions without typed parameters show errors. You have a handler: \`function handle\(event\) \{ ... \}\`. TypeScript infers \`event\` as \`any\` because it lacks a type annotation, but \`noImplicitAny\` forbids this implicit behavior. You try hovering over \`event\` to see inferred type, but it's just \`any\`. You need to tell TypeScript what \`event\` is. If it's a DOM event, you type it as \`event: Event\` or \`MouseEvent\`. If it's an Express request, you import \`Request\` from 'express'. Once annotated, the error disappears. You realize \`noImplicitAny\` forces you to document your function contracts, preventing accidental untyped code from leaking through the codebase.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T02:12:42.760311+00:00— report_created — created