{"id":51767842,"url":"https://github.com/woxlo1/ts-explainer","last_synced_at":"2026-07-19T20:04:36.860Z","repository":{"id":368593917,"uuid":"1285151869","full_name":"woxlo1/ts-explainer","owner":"woxlo1","description":"TypeScript compiler errors, explained in plain English. Pipe tsc output into ts-explainer for clear, actionable error messages.","archived":false,"fork":false,"pushed_at":"2026-07-02T09:54:02.000Z","size":105,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-02T11:27:07.295Z","etag":null,"topics":["cli","developer-tools","devtools","error-messages","nodejs","tsc","typescript","typescript-errors"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/ts-explainer","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/woxlo1.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-30T14:25:50.000Z","updated_at":"2026-07-02T09:51:35.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/woxlo1/ts-explainer","commit_stats":null,"previous_names":["woxlo1/tsclear","woxlo1/ts-explainer"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/woxlo1/ts-explainer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woxlo1%2Fts-explainer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woxlo1%2Fts-explainer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woxlo1%2Fts-explainer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woxlo1%2Fts-explainer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/woxlo1","download_url":"https://codeload.github.com/woxlo1/ts-explainer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woxlo1%2Fts-explainer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35664172,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-19T02:00:06.923Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","developer-tools","devtools","error-messages","nodejs","tsc","typescript","typescript-errors"],"created_at":"2026-07-19T20:04:31.130Z","updated_at":"2026-07-19T20:04:36.848Z","avatar_url":"https://github.com/woxlo1.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./assets/logo.svg\" alt=\"ts-explainer logo\" width=\"400\"\u003e\n\u003c/p\u003e\n\n# ts-explainer\n\n[![CI](https://github.com/woxlo1/ts-explainer/actions/workflows/ci.yml/badge.svg)](https://github.com/woxlo1/ts-explainer/actions/workflows/ci.yml)\n[![npm version](https://img.shields.io/npm/v/ts-explainer.svg)](https://www.npmjs.com/package/ts-explainer)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n\u003e TypeScript compiler errors, explained in plain English. Now with Japanese support! 🇯🇵\n\n`ts-explainer` pipes between `tsc` and your terminal and rewrites cryptic TypeScript errors into clear, actionable explanations — without losing any information. **Supports English and Japanese.**\n\n---\n\n## The problem\n\n```\nsrc/api.ts(23,5): error TS2345: Argument of type '{ id: string; name: string; }' is not\nassignable to parameter of type 'User'. Type '{ id: string; name: string; }' is missing\nthe following properties from type 'User': email, createdAt, updatedAt\n```\n\nWhat does that actually mean? What should you fix first?\n\n## The solution\n\n```\n$ npx tsc --noEmit | npx ts-explainer\n\nTS2345  src/api.ts:23:5\n  → You're calling a function with an argument of type '{ id: string; name: string; }',\n    but it expects type 'User'. Double-check the value you're passing in, or the\n    function's parameter type.\n```\n\nSame information, actually readable.\n\n---\n\n## Install\n\n```bash\nnpm install -D ts-explainer\n```\n\nOr run without installing:\n\n```bash\nnpx tsc --noEmit | npx ts-explainer\n```\n\n## Usage\n\nPipe any `tsc` output into `ts-explainer`:\n\n```bash\nnpx tsc --noEmit | npx ts-explainer\n```\n\nWorks with any `tsc` flags you're already using:\n\n```bash\nnpx tsc --noEmit --strict | npx ts-explainer\nnpx tsc -p tsconfig.prod.json | npx ts-explainer\n```\n\n### Language support\n\nBy default, errors are explained in **English**. To use **Japanese**, pass the `--ja` flag or `--lang ja`:\n\n```bash\n# Japanese output\nnpx tsc --noEmit | npx ts-explainer --ja\nnpx tsc --noEmit | npx ts-explainer --lang ja\n\n# English output (default)\nnpx tsc --noEmit | npx ts-explainer --lang en\nnpx tsc --noEmit | npx ts-explainer\n```\n\nYou can also set the language via environment variable:\n\n```bash\nexport TS_EXPLAINER_LANG=ja\nnpx tsc --noEmit | npx ts-explainer\n```\n\n#### Japanese example (日本語の例)\n\n```\n$ npx tsc --noEmit | npx ts-explainer --ja\n\nTS2345  src/api.ts:23:5\n  → 型 '{ id: string; name: string; }' の引数で関数を呼び出していますが、型 'User' を期待しています。\n    渡している値、または関数のパラメータ型を再確認してください。\n```\n\n### Add to package.json\n\n```json\n{\n  \"scripts\": {\n    \"typecheck\": \"tsc --noEmit | ts-explainer\",\n    \"typecheck:ja\": \"tsc --noEmit | ts-explainer --ja\"\n  }\n}\n```\n\nThen run with:\n\n```bash\nnpm run typecheck\nnpm run typecheck:ja\n```\n\n### JSON output\n\n`ts-explainer` also supports JSON output for programmatic use:\n\n```bash\nnpx tsc --noEmit | npx ts-explainer --json\nnpx tsc --noEmit | npx ts-explainer --ja --json\n```\n\n### Unknown errors\n\nErrors that `ts-explainer` doesn't recognize yet are passed through unchanged — you never lose information from the original `tsc` output.\n\n---\n\n## Use as a library\n\n`ts-explainer` also exports its parser and explainer for programmatic use:\n\n```typescript\nimport { parseTscOutput, explainAll } from \"ts-explainer\";\n\nconst raw = `src/index.ts(1,1): error TS2304: Cannot find name 'fetchUser'.`;\n\n// English (default)\nconst diagnostics = parseTscOutput(raw);\nconst explained = explainAll(diagnostics, \"en\");\n\nconsole.log(explained[0].explanation);\n// → 'fetchUser' isn't defined anywhere TypeScript can see. This is usually\n//   a missing import, a typo, or a missing @types package for a third-party library.\n\n// Japanese\nconst explainedJa = explainAll(diagnostics, \"ja\");\nconsole.log(explainedJa[0].explanation);\n// → 'fetchUser' は TypeScript が確認できる場所のどこにも定義されていません。\n//   これは通常、インポートの欠落、タイプミス、またはサードパーティライブラリの @types パッケージの欠落です。\n```\n\nAvailable exports:\n\n```typescript\nimport {\n  parseTscOutput,      // string → ParsedDiagnostic[]\n  explainAll,          // ParsedDiagnostic[], Language? → ClearedDiagnostic[]\n  explainDiagnostic,   // ParsedDiagnostic, Language? → ClearedDiagnostic\n  patterns,            // ErrorPattern[] — the full list of known patterns\n} from \"ts-explainer\";\n```\n\n---\n\n## Supported error codes\n\n| Code     | Meaning                                          |\n| -------- | ------------------------------------------------- |\n| TS2304   | Cannot find name (missing import / typo)          |\n| TS2307   | Cannot find module or its type declarations       |\n| TS2322   | Type is not assignable to target type             |\n| TS2339   | Property does not exist on type                   |\n| TS2345   | Argument type mismatch in a function call         |\n| TS2349   | Expression is not callable                        |\n| TS2352   | Type conversion may be a mistake                  |\n| TS2366   | Function missing ending return statement          |\n| TS2367   | Condition always returns same value (no overlap)  |\n| TS2511   | Cannot instantiate an abstract class              |\n| TS2531   | Object is possibly `null`                         |\n| TS2532   | Object is possibly `undefined`                    |\n| TS2540   | Cannot assign to a read-only property             |\n| TS2551   | Property doesn't exist — did you mean X?          |\n| TS2554   | Wrong number of arguments in a call               |\n| TS2741   | Required property missing on an object            |\n| TS2769   | No function overload matches the call             |\n| TS7006   | Parameter implicitly has an `any` type            |\n| TS7053   | Expression can't be used to index type            |\n| TS18048  | Value is possibly `undefined`                     |\n| TS2347   | Type arguments not allowed here                   |\n| TS2448   | Variable used before its declaration              |\n| TS2559   | Object has no properties in common with type      |\n| TS2578   | Unused @ts-expect-error directive                 |\n| TS2614   | Module has no exported member                     |\n| TS2693   | Type used as a value at runtime                   |\n| TS2722   | Cannot invoke a possibly undefined function       |\n| TS4114   | Override keyword required                         |\n| TS6133   | Variable declared but never read                  |\n| TS7015   | Array index expression is not a number            |\n| TS2355   | Function must return a value                      |\n| TS2377   | Derived class constructor must call super()       |\n| TS2391   | Function implementation is missing               |\n| TS2408   | Setters cannot return a value                     |\n| TS2416   | Property incompatible with base type              |\n| TS2420   | Class incorrectly implements interface            |\n| TS2451   | Cannot redeclare block-scoped variable            |\n| TS2454   | Variable used before being assigned               |\n| TS2503   | Cannot find namespace                             |\n| TS2515   | Abstract members not implemented                  |\n| TS2533   | Object is possibly null or undefined              |\n| TS2564   | Property has no initializer                       |\n| TS2571   | Object is of type unknown                         |\n| TS2588   | Cannot assign to a constant                       |\n| TS2683   | this implicitly has type any                      |\n| TS2689   | Use implements instead of extends for interface   |\n| TS2691   | Import path cannot end with .ts extension         |\n| TS2759   | Cannot destructure property of null/undefined     |\n| TS2589   | Type instantiation is excessively deep            |\n\nAll error explanations are now available in **English and Japanese**. More patterns are added with every release. Open an issue or PR if you keep running into an error that isn't covered yet — see [CONTRIBUTING.md](./CONTRIBUTING.md).\n\n---\n\n## Requirements\n\n- Node.js 18 or later\n\n## Versioning\n\nThis project follows [Semantic Versioning](https://semver.org/) and [Conventional Commits](https://www.conventionalcommits.org/). Version numbers are bumped at release time only — not on every commit.\n\n## Contributing\n\nContributions are welcome! The most valuable thing you can add is a new error pattern explanation. See [CONTRIBUTING.md](./CONTRIBUTING.md) for how to add one, run tests, and how releases are cut.\n\n## License\n\nMIT © [woxlo1](https://github.com/woxlo1)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoxlo1%2Fts-explainer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwoxlo1%2Fts-explainer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoxlo1%2Fts-explainer/lists"}