Skip to main content

TypeScript Error Decoder

Paste a TypeScript error code (e.g. TS2345) or message to get a plain-English explanation and actionable fix suggestions. Covers 50+ common TypeScript errors.

✓ 50+ error codes covered ✓ Plain-English explanations ✓ Fix code examples ✓ Searchable error database

All Errors

Frequently Asked Questions

What does TypeScript error TS2345 mean?▼

TS2345 is 'Argument of type X is not assignable to parameter of type Y'. It appears when you pass a value to a function that expects a different type — for example, passing a string to a function that expects a number. Fix by ensuring the types match, adding a type assertion, or widening the function's parameter type.

What is TS2304 and how do I fix it?▼

TS2304 is 'Cannot find name X'. TypeScript cannot find the declaration for a variable, function, or type. Common causes: missing import, wrong variable name, missing @types package, or forgot to declare a global. Fix by importing the symbol, installing the type package (e.g., @types/node), or adding a declaration file.

What does TS7006 (implicitly has an 'any' type) mean?▼

TS7006 means a function parameter has no type annotation and TypeScript infers it as 'any' in strict mode. This is an error when noImplicitAny is enabled (part of strict: true). Fix by adding an explicit type annotation to the parameter: (x: string) => ... or (item: MyType) => ...

Why am I getting TS2307 (Cannot find module)?▼

TS2307 means TypeScript cannot find the module you're importing. Causes: wrong path, missing @types package, the package has no type declarations, or moduleResolution is misconfigured. For npm packages without built-in types, install @types/package-name. For packages with no types at all, add declare module 'package-name' in a .d.ts file.

How do I suppress a TypeScript error on one line?▼

Use // @ts-ignore on the line before to suppress the error on the next line. Use // @ts-expect-error to suppress AND be warned if the error disappears (safer). Use // @ts-nocheck at the top of a file to disable TypeScript for the whole file. Prefer fixing the underlying type issue rather than suppressing.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →