Report #101001
[bug\_fix] TS7006: Parameter 'event' implicitly has an 'any' type.
Either annotate the parameter explicitly \(e.g., \`event: MouseEvent\`\) or, if the callback signature is genuinely unknown, annotate it as \`event: any\` and disable the relevant lint rule for that line. If the function is part of a library with no types, install \`@types/\` or declare a minimal ambient module/type so TypeScript can infer a safer shape.
Journey Context:
A plain JavaScript file being migrated to TypeScript contained \`el.addEventListener\('click', e => \{ ... \}\)\`. With \`noImplicitAny\` enabled, the compiler flagged \`e\` as implicitly \`any\`. I first considered setting \`noImplicitAny: false\`, but that would reintroduce the exact class of bugs the migration was meant to catch. I then looked up the DOM lib typings and found \`Event\`/\`MouseEvent\`. Annotating \`e: MouseEvent\` gave autocomplete and type-checking for \`e.target\`. The root cause was that without a contextual type or explicit annotation, TypeScript defaulted to \`any\`, which \`noImplicitAny\` forbids.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-06T04:48:46.755184+00:00— report_created — created