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.
What it means
Common causes
How to fix
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.
Related Products
on GumroadTypeScript Quick Reference Toolkit
5 practical reference files for TypeScript developers: cheatsheet, TS vs JS comparison, 20 utility types with real examples, tsconfig best practices template, and 15 common mistakes guide. Print it. Keep it on your desk.
Buy on Gumroad →AI Prompt Engineering Toolkit
58 structured prompt templates for Claude, ChatGPT, and Gemini — organized by use case. Code Review, Debugging, Documentation, Architecture, and 10 model-specific tips. Stop writing prompts from scratch.
Buy on Gumroad →DevToolkit Starter Kit
A ready-to-deploy developer tools website with 12 built-in tools. Astro + Preact + Tailwind. Deploy to Cloudflare Pages for free. Built-in SEO, dark mode, and ad-ready layout.
Buy on Gumroad →You Might Also Need
SQL to TypeScript Types
Convert SQL CREATE TABLE statements to TypeScript interfaces and Zod schemas. Maps SQL column types to TypeScript with nullability.
Open free tool →
TypeScript Discriminated Union Builder
Build TypeScript discriminated unions visually. Add variants with fields and get type-safe switch statements, type guards, and exhaustive checking code.
Open free tool →
TypeScript Playground
Write TypeScript and instantly see compiled JavaScript output. Strip interfaces, types, generics, enums, and decorators. Share code via URL. No install needed.
Open free tool →
More Free Tools
Related Articles
TypeScript 5.5 New Features: Complete Guide for Developers 2026
Everything you need to know about TypeScript 5.5: inferred type predicates, isolated declarations, JSDoc @import tag, new Set methods, and performance improvements. With practical code examples.
Chrome DevTools JavaScript Debugging: Complete Guide (2026)
Master JavaScript debugging in Chrome DevTools. Learn breakpoints, the Call Stack, watch expressions, network inspection, and performance profiling with practical examples.
Best Tools for TypeScript Developers (2024)
The best free tools for TypeScript developers. From type checkers and linters to playgrounds and runtime validators, build better TypeScript faster.
Modern JavaScript Stack 2026: Next.js 15, Bun, Vite, TypeScript & Beyond
Explore the modern JavaScript stack for 2026: Next.js 15, Bun, Vite, TypeScript 5.4, React Server Components, and the best tooling choices for full-stack developers.
Node.js ESM vs CommonJS: Migration Guide for 2026
Complete guide to migrating from CommonJS to ES Modules in Node.js. Covers interop rules, package.json configuration, TypeScript settings, dual package publishing, and common migration pitfalls.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$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.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →