yoavbls/pretty-ts-errors

TypeScriptmarketplace.visualstudio.com/items

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

typescriptvscodevscode-extensionerrorsastrodenosveltevue
Sterne-Wachstum
Sterne
14.1k
Forks
111
Wochenwachstum
+-2
Issues
15
10k12k14k
Apr. 2023Mai 2024Juli 2025Sept. 2026
Artefaktenpm
README
Logo

Pretty TypeScript Errors

Make TypeScript errors prettier and human-readable in VSCode.

GitHub stars Visual Studio Code GitHub license Visual Studio Code Webstorm logo Cursor

TypeScript errors become messier as the complexity of types increases. At some point, TypeScript will throw on you a shitty heap of parentheses and "...". This extension will help you understand what's going on. For example, in this relatively simple error:

   

Watch this

Watch theo's video

and others from: Web Dev Simplified, Josh tried coding, trash dev, and more

Features

  • Syntax highlighting with your theme colors for types in error messages, supporting both light and dark themes
  • A button that leads you to the relevant type declaration next to the type in the error message
  • A button that navigates you to the error at typescript.tv, where you can find a detailed explanation, sometimes with a video
  • A button that navigates you to ts-error-translator, where you can read the error in plain English

Supports

  • Node and Deno TypeScript error reporters (in .ts files)
  • JSDoc type errors (in .js and .jsx files)
  • React, Solid and Qwik errors (in .tsx and .mdx files)
  • Astro, Svelte and Vue files when TypeScript is enabled (in .astro, .svelte and .vue files)
  • Ember and Glimmer TypeScript errors and template issues reported by Glint (in .hbs, .gjs, and .gts files)

Installation

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

Or simply by searching for pretty-ts-errors in the VSCode marketplace

How to hide the original errors and make the types copyable

Follow the instructions there. unfortunately, this hack is required because of VSCode limitations.

Why isn't it trivial

  1. TypeScript errors contain types that are not valid in TypeScript. Yes, these types include things like ... more ..., { ... }, etc in an inconsistent manner. Some are also cutting in the middle because they're too long.
  2. Types can't be syntax highlighted in code blocks because the part of type X = ... is missing, so I needed to create a new TextMate grammar, a superset of TypeScript grammar called type.
  3. VSCode markdown blocks all styling options, so I had to find hacks to style the error messages. e.g., there isn't an inlined code block on VSCode markdown, so I used a code block inside a codicon icon, which is the only thing that can be inlined. That's why it can't be copied. but it isn't a problem because you can still hover on the error and copy things from the original error pane.

Hype section

Winning the Productivity Booster category at JSNation 2023 Tanner's tweet Theo's tweet Johnson's tweet

Stars from stars


Kent C. Dodds

Matt Pocock

Alex / KATT

Tanner Linsley

Theo Browne

Sponsorship

Every penny will be invested in other contributors to the project, especially ones that work on things that I can't be doing myself like adding support to the extension for other IDEs 🫂

Contribution

Help by upvoting or commenting on issues we need to be resolved here Any other contribution is welcome. Feel free to open any issue / PR you think.

Ähnliche Repositories
n8n-io/n8n

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

TypeScriptnpmcliOtherautomationipaas
n8n.io
203.7k60.6k
microsoft/vscode

Visual Studio Code

TypeScriptnpmappMIT Licenseeditorelectron
code.visualstudio.com
191.5k42k
f/prompts.chat

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

HTMLawesomeOtherchatgptai
prompts.chat
169.6k21.8k
langchain-ai/langchain

The agent engineering platform.

PythonPyPIlibraryMIT Licenseaianthropic
docs.langchain.com/langchain/
145.9k24.4k
immich-app/immich

High performance self-hosted photo and video management solution.

TypeScriptnpmappGNU Affero General Public License v3.0backup-toolmobile-app
immich.app
113.6k6.8k
microsoft/TypeScript

TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

GoGo ModulesApache License 2.0typescriptjavascript
typescriptlang.org
111k13.8k
denoland/deno

A modern runtime for JavaScript and TypeScript.

Rustcrates.ioMIT Licensedenotypescript
deno.com
108.4k6.4k
angular/angular

Deliver web apps with confidence 🚀

TypeScriptnpmMIT Licenseangulartypescript
angular.dev
101k27.4k
ant-design/ant-design

An enterprise-class UI design language and React UI library

TypeScriptnpmMIT Licensereactui-kit
ant.design
99.4k54.7k
oven-sh/bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one

Rustcrates.iolibraryOtherbunbundler
bun.com
95.9k5k
ruvnet/RuView

π RuView turns commodity WiFi signals into real-time spatial intelligence, vital sign monitoring, and presence detection — all without a single pixel of video.

Rustcrates.ioawesomeMIT Licensedenseposewifi
cognitum.one/RuView
92.8k12.3k
storybookjs/storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation

TypeScriptnpmtutorialMIT Licensestorybookstyleguide
storybook.js.org
91k10.4k