Open-source project
yoavbls/pretty-ts-errors avatar
yoavbls/pretty-ts-errors

pretty-ts-errors paints the type soup, then leaves you the same error

🔵 Make TypeScript errors prettier and human-readable in VSCode 🎀

14,100 stars114 forksTypeScriptMIT

At a glance

What is it?
A VSCode extension that rewrites TypeScript diagnostics with a custom TextMate grammar and jump buttons, built around a rendering trick that makes the styled types unselectable. It fixes reading, never the type, and it exists for VSCode only.
Who is it for?
Use it if you work in VSCode, if long generic types are the errors you actually hit, and if reading a raw diagnostic costs you more attention than one extra rendered pane does. Skip it if your editor is Neovim, Zed or a JetBrains IDE, if your habit is copying error text into an issue, or if your diagnostics do not come from the reporters on the supported list.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 7 days ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 23, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • yoavbls/pretty-ts-errors14,100 ★ · +2
Star history
Repository2026-09-222026-11-23
yoavbls/pretty-ts-errors14.1k14.1k

2 Stars in the last 62 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

TypeScript prints types that are not valid TypeScript

Every type in a TypeScript diagnostic is missing the part that would make it code. There is no `type X = ...` prefix, so the editor has nothing to hang a grammar on. On top of that, the compiler truncates what it prints: error text includes `... more ...` and `{ ... }` placeholders in an inconsistent order, and long types get chopped partway through. The author answered this by writing a new TextMate grammar called `type`, a superset of the TypeScript grammar, and using it to paint each type with your theme's own colors in both light and dark themes. What this layer cannot do is shrink the type. It does not eliminate a union member, widen a generic, or remove one nesting level, and it will not lower the count in your terminal. The complexity that produced the heap of parentheses is the same object the pretty version is rendering. The reading work stops at comprehension, and the editing work still begins from scratch, with the undecorated message as the thing you have to reason about anyway.

VSCode markdown blocks styling, so the code block lives inside a codicon

VSCode's markdown rendering blocks every styling option the grammar needs, and there is no inline code block in VSCode markdown. The workaround was to put a code block inside a codicon icon, since a codicon is the only thing that can be inlined. The direct consequence is that the highlighted types are not copyable: what reads as a code block in the message is an icon rendering. The author treats this as acceptable on the grounds that you can still hover the error and copy from the original error pane. That holds for reading and for private notes, and it fails for the everyday case of lifting a type out of the message to paste into a forum thread, a bug report, or a chat with a teammate. The README also links instructions for hiding the original errors and making the types copyable.

Hiding the original error pane is an admitted VSCode hack

Turning off the original error output is documented separately, at docs/hide-original-errors.md, and the reason given for it is blunt: it is a hack, and VSCode limitations make it necessary. The README frames the same instructions as the way to make the types copyable.

Two of the three buttons hand your error to a site you do not control

There are three buttons in a rewritten message. One jumps to the type declaration for the type you clicked. One opens typescript.tv, where the project expects a written explanation and sometimes a video. One opens ts-error-translator.vercel.app so you can read the error in plain English. Two of the three are outbound links to hosted services this repository does not own, and nothing in the project says what happens when a lookup misses or the host does not answer. On a machine with no network access, or on a corporate network that blocks the domain, you keep the highlighting and the declaration jump, and the two explanation buttons have nothing to open. A serious type error, the one about to be escalated to whoever owns the module, is exactly the one where you want the on-screen message to remain a complete record of what the compiler said.

VSCode is the only editor that gets a build

The install target is a VSCode extension:

code
code --install-extension yoavbls.pretty-ts-errors

A marketplace page and an Open VSX entry cover VSCode-compatible editors, which is as far as it goes. JetBrains support exists as a discussion thread linked from the top of the README, not as a shipped artifact. The project also says where sponsorship money is meant to go, and adding support for other IDEs is named as the example of work the author cannot do himself. So the extension will not appear in a Neovim or Zed setup. For a team that standardized on anything other than VSCode, the cost is not the free install but the hours spent finding that out.

The supported reporter list is conditional in two places

The coverage list is specific enough to use as a checklist. Node and Deno TypeScript error reporters in .ts files. JSDoc type errors in .js and .jsx. React, Solid and Qwik errors in .tsx and .mdx. Astro, Svelte and Vue files when TypeScript is enabled, in .astro, .svelte and .vue. Ember and Glimmer TypeScript errors plus template issues reported by Glint, in .hbs, .gjs and .gts. Two of those lines carry conditions, and the conditions are where coverage stops working for you. A Vue or Astro project with TypeScript switched off produces nothing to reformat, and an Ember project without Glint installed reports template problems the extension never sees. The example files shipped in the repository are narrower than the claim, holding errors.ts, errors.js and errors.vue with nothing for the Astro, Svelte, Ember or Glimmer paths. If your daily errors live in those four, the highlighting you are evaluating here is not what you would see all day.

Building it means a Turborepo monorepo with two different version pins

The extension is built from a monorepo rather than a single extension folder. The root package.json is private, named pretty-ts-errors-mono, and declares workspaces for packages/* and apps/*. Every lifecycle task is delegated to Turborepo:

code
"build": "turbo run build",
"dev": "turbo run dev",
"lint": "turbo run lint",
"test": "turbo run test"

Formatting runs Prettier over ts, tsx, js, mjs, cjs, json, md, yml, yaml, css and html, in both a write mode and a check mode. Two version constraints sit side by side and are not the same kind of constraint: engines asks for `>=20`, while packageManager pins `[email protected]`. The allowScripts list is short and specific, naming the three packages npm is permitted to run install scripts for: [email protected], @vscode/[email protected] and [email protected]. Expect a native toolchain and a signing step rather than a pure JavaScript build before anything can be published.

Main is months ahead of the newest tag

Version v0.8.5 was tagged on 2026-03-21, and the last push is dated 2026-10-31. Those dates sit roughly seven months apart, so main carries commits that no published release contains. The spacing between earlier tags is uneven too: v0.6.1 on 2024-11-24, v0.7.0 on 2025-12-25, then v0.8.5 on 2026-03-21, with thirteen months between the first two and three between the last two. The repository is not archived and recent pushes show ongoing work, so this is not a dead project, but commit activity and release activity are different signals. The consequence is a gap between what you clone and what colleagues install. Evaluating the grammar, the buttons, or the hide-original-errors instructions from a checkout of main means testing a build the marketplace is not serving, and a regression report written against it may not match the version on anyone else's machine.

Editorial conclusion

Use it if you work in VSCode, if long generic types are the errors you actually hit, and if reading a raw diagnostic costs you more attention than one extra rendered pane does. Skip it if your editor is Neovim, Zed or a JetBrains IDE, if your habit is copying error text into an issue, or if your diagnostics do not come from the reporters on the supported list. Before committing to it, check two things on your own machine: whether the type grammar still colors anything under your VSCode build, and whether the extension still works with the original error pane visible, since the pretty output is decoration layered on a message it does not own. Hide the original pane last, if at all.

Frequently asked questions

What are TS errors?

In this project's terms, they are diagnostics whose types are not valid TypeScript: the text includes things like `... more ...` and `{ ... }` in an inconsistent manner, and long types get cut off mid-way. There is no `type X = ...` prefix, which is why highlighting them needs a separate TextMate grammar.

How to suppress ts error?

pretty-ts-errors does not suppress diagnostics, it reformats them. Suppressing the original output is a separate manual step documented in docs/hide-original-errors.md, described as a hack required by VSCode limitations.

How can I fix errors in TypeScript?

The extension is a reading layer, so fixing is still your job: it adds a button to the relevant type declaration, a link to typescript.tv for a written explanation, and a link to ts-error-translator to read the message in plain English. It does not change the type checker or lower the error count.

How do I catch errors in TypeScript?

The scope here is diagnostic text, not runtime handling. The extension works on output from Node and Deno TypeScript error reporters in .ts files, JSDoc type errors in .js and .jsx, and framework errors in .tsx and .mdx, with conditional support for .astro, .svelte, .vue, .hbs, .gjs and .gts.

Official sources

  1. License: MIT
  2. Project website
  3. README
  4. Releases
  5. yoavbls/pretty-ts-errors on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/yoavbls-pretty-ts-errors.svg)](https://hysenlabs.com/projects/yoavbls-pretty-ts-errors)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/yoavbls-pretty-ts-errors.svg)](https://hysenlabs.com/projects/yoavbls-pretty-ts-errors)

Was this useful?