Short answer
For a parameter, add a type annotation (or let it be inferred by passing the function where a typed callback is expected). For a module, install its types (npm install -D @types/name) or, if none exist, declare the module in a .d.ts file. For an index error, type the object as a Record or narrow the key with keyof typeof. Turning off noImplicitAny makes the message go away but removes the checking it gives you.
Which variant it is, and the fix
01
TS7006: a parameter without a type
“In some cases where no type annotations are present, TypeScript will fall back to a type of any for a variable when it cannot infer the type.” TypeScript, TSConfig: noImplicitAny
A standalone function or a callback stored in an unannotated variable has nothing to infer its parameter types from. Annotate them. Inline callbacks passed to typed functions (map, addEventListener, onClick) get their types automatically.
function total(items: { price: number }[]) { return items.reduce((sum, item) => sum + item.price, 0); }02
TS7016: a package without types
“Definitions on DefinitelyTyped are also automatically published to npm under the @types scope.” TypeScript, Type declarations: DefinitelyTyped
The package ships plain JavaScript. Install the community types if they exist; otherwise declare the module yourself so the import is typed as any on purpose.
npm install -D @types/lodash // src/types/untyped.d.ts (when no @types package exists) declare module 'some-untyped-lib'; // in a .d.ts that tsconfig includes, with no top-level import or export03
TS7053: indexing an object with a string
obj[key] with key: string fails when obj has a fixed set of keys. Narrow the key to those keys, or type the object as a lookup table.
const labels = { draft: 'Draft', sent: 'Sent' }; function label(status: keyof typeof labels) { return labels[status]; } const counts: Record<string, number> = {};04
Why not turn noImplicitAny off
“Use the compiler flag noImplicitAny to flag any implicit any as an error.” TypeScript, Everyday types: any
It is on in every strict project for a reason: an implicit any silently disables type checking for everything that touches that value. Fix the few spots instead.
Checked against the vendor’s docs on : TSConfig: noImplicitAny; TypeScript Handbook: Type declarations; TypeScript Handbook: Everyday types.
Rather hand it over?
Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.
- from $450App Fix TicketOne reproducible bug in an existing mobile or web app, diagnosed and fixed.See scope and start
- from $450AI-Built App RescueA Lovable, Bolt or Cursor app checked end to end in 3 days, then its worst problems fixed at a fixed price.No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.See scope and start
Related: TypeScript “Cannot find name” · TypeScript “Argument of type is not assignable to parameter” · TypeScript “Property does not exist on type”