想隐藏原始报错并让类型可复制需按 docs/hide-original-errors.md 手动配置,受 VSCode 限制属于 hack;报错中的类型无法直接复制,需悬停原始报错面板复制;JetBrains 等其他 IDE 支持仍在讨论中,尚未提供
code --install-extension yoavbls.pretty-ts-errorsREADME 未说明,纯 VSCode 扩展,无 GPU 或显存要求
VSCode 扩展,把 TypeScript 冗长难读的类型报错渲染成带高亮、可跳转的易读信息
把 TypeScript 报错信息渲染成带语法高亮和类型展开的可读格式,在 VSCode 里看错误不再是一大坨红字。
核心能力
- 用当前主题配色对报错中的类型做语法高亮
- 报错类型旁提供按钮跳转到对应类型声明
- 提供按钮跳转 typescript.tv 查看详细解释
- 提供按钮跳转 ts-error-translator 翻译成通俗英文
- 支持 Node/Deno、JSDoc、React/Solid/Qwik、Astro/Svelte/Vue 等报错
容易踩的坑
- v0.8.5最新正式版2026-03-21 · 2026-03-21 19:45 UTC
pretty-ts-errors is more stable!
What's Changed
- docs: fix vscode image show by @WuMingDao in https://github.com/yoavbls/pretty-ts-errors/pull/165
- Fix TypeScript workspace references stuff by @yoavbls in https://github.com/yoavbls/pretty-ts-errors/pull/168
- Feat: add logger and performance measurement by @kevinramharak in https://github.com/yoavbls/pretty-ts-errors/pull/151
- Fix/add missing supported lang ids by @kevinramharak in https://github.com/yoavbls/pretty-ts-errors/pull/171
- Update log instructions link in bug report template by @kevinramharak in https://github.com/yoavbls/pretty-ts-errors/pull/173
- add global tsdown.config to ignore .turbo directories by @kevinramharak in https://github.com/yoavbls/pretty-ts-errors/pull/172
- Fix/move markdown preview by @kevinramharak in https://github.com/yoavbls/pretty-ts-errors/pull/170
- Improve the errors Side Panel by @yoavbls in https://github.com/yoavbls/pretty-ts-errors/pull/176
- Move to latest prettier with async API by @yoavbls in https://github.com/yoavbls/pretty-ts-errors/pull/179
- Format files with prettier by @yoavbls in https://github.com/yoavbls/pretty-ts-errors/pull/180
- Fix panel visibility and bump version by @yoavbls in https://github.com/yoavbls/pretty-ts-errors/pull/181
- fix: pin error focuses the view instead of the view container by @tysoncung in https://github.com/yoavbls/pretty-ts-errors/pull/183
- Fix: Pass message to side panel by @yoavbls in https://github.com/yoavbls/pretty-ts-errors/pull/185
- fix: harden regexes against ReDoS backtracking vulnerabilities by @tysoncung in https://github.com/yoavbls/pretty-ts-errors/pull/186
- fix: update command to focus on the side panel in showErrorInSidebar by @kevinramharak in https://github.com/yoavbls/pretty-ts-errors/pull/189
- Sidebar cache + handle theme not found cases by @yoavbls in https://github.com/yoavbls/pretty-ts-errors/pull/190
New Contributors
- @WuMingDao made their first contribution in https://github.com/yoavbls/pretty-ts-errors/pull/165
- @tysoncung made their first contribution in https://github.com/yoavbls/pretty-ts-errors/pull/183
Full Changelog: https://github.com/yoavbls/pretty-ts-errors/compare/v0.7.0...v0.8.5
- v0.7.02025-12-25 · 2025-12-25 23:40 UTC
查看更新说明
In this release, we have a special holiday gift for you that’s been a long time coming! 🎁✨
🔍 Error Previews
New Preview Button: Every pretty error message now features
a preview button that opens the error in a full new tab! 📑We’ve also added a new panel in the Explorer tab that
automatically shows the error currently under your cursor. 🎯📁 Copyable Types
all types are fully copyable in the preview because the usual VS Code hover limitations don’t apply!
🛠️ Shiki Bridge
To ensure code blocks work perfectly with your specific theme and extensions, we created a library that generates code blocks with Shiki highlighter by extracting your active theme and extensions. This is something that wasn't possible in VS Code before!
https://github.com/yoavbls/vscode-shiki-bridgeHuge thanks to @MichaelDimmitt and @kevinramharak for the amazing work on making this happen! It’s been a long-awaited feature, and we’re so happy it’s finally here! 🥳
📁 Copy Button
Thanks to @Vinayak9769, we now have a dedicated copy button for error messages!
📺 New Errors in TypeScriptTV
Support for many more error types has been added thanks to @bennycode!
Now, every error includes a direct link. 🔗🏗️ Under the Hood
We’ve officially completed our migration to a monorepo!
Milestones
🌟 14k stars ⬇️ 2m downloads
Changelog
- feat: make errors copyable by @Vinayak9769 in https://github.com/yoavbls/pretty-ts-errors/pull/156
- add a case to detect ts(1196) by @kevinramharak in https://github.com/yoavbls/pretty-ts-errors/pull/137
- Add assets used in README.md by @kevinramharak in https://github.com/yoavbls/pretty-ts-errors/pull/140
- Fix 134 again by @kevinramharak in https://github.com/yoavbls/pretty-ts-errors/pull/141
- Migrate to monorepo by @yoavbls in https://github.com/yoavbls/pretty-ts-errors/pull/51
- cleanup dependencies by @kevinramharak in https://github.com/yoavbls/pretty-ts-errors/pull/147
- Fix: update esbuild by @kevinramharak in https://github.com/yoavbls/pretty-ts-errors/pull/148
- update mocha, glob; update tests to match sample from @vscode/test by @kevinramharak in https://github.com/yoavbls/pretty-ts-errors/pull/149
- delete obsolete package-lock.json by @kevinramharak in https://github.com/yoavbls/pretty-ts-errors/pull/150
- Bump js-yaml from 4.1.0 to 4.1.1 by @dependabot[bot] in https://github.com/yoavbls/pretty-ts-errors/pull/154
- feat: make errors copyable by @Vinayak9769 in https://github.com/yoavbls/pretty-ts-errors/pull/156
- Remove error list constraint by @bennycode in https://github.com/yoavbls/pretty-ts-errors/pull/157
- reimplement button-to-open-in-new-tab + custom webview #133 (monorepo) by @kevinramharak and @MichaelDimmitt in https://github.com/yoavbls/pretty-ts-errors/pull/152
HUGE THANKS, SPECIALLY TO @kevinramhar 👏👏
New Contributors
- @Vinayak9769 made their first contribution in https://github.com/yoavbls/pretty-ts-errors/pull/156
Full Changelog: https://github.com/yoavbls/pretty-ts-errors/compare/v0.6.1...v0.7.0
- v0.6.12024-11-24 · 2024-11-24 00:07 UTC
查看更新说明
What's Changed
- Extend list of known error numbers by @bennycode in https://github.com/yoavbls/pretty-ts-errors/pull/126
- Bump version of libs by @yoavbls in https://github.com/yoavbls/pretty-ts-errors/commit/e041cfd4ffb6ad8d252e554a10a0ed757e8b1992
Full Changelog: https://github.com/yoavbls/pretty-ts-errors/compare/v0.6.0...v0.6.1
1,000,000
We've reached 1 million downloads BTW
- v0.6.02024-07-31 · 2024-07-31 21:12 UTC
查看更新说明
What's Changed
- Extend list of known error numbers by @bennycode in https://github.com/yoavbls/pretty-ts-errors/pull/115
- refactor: use PropertyKey instead of key list by @EdamAme-x in https://github.com/yoavbls/pretty-ts-errors/pull/113
- Fix: adjust missing props regex to work for private properties by @kevinramharak in https://github.com/yoavbls/pretty-ts-errors/pull/106
- Fix issue #82 - ts(4113), ts(4117) by @yoavbls in https://github.com/yoavbls/pretty-ts-errors/pull/114
- Add
ts-pluginto diagnostic sources by @yoavbls in https://github.com/yoavbls/pretty-ts-errors/pull/103 - update @vscode/test-electron to 2.3.9 by @kevinramharak in https://github.com/yoavbls/pretty-ts-errors/pull/99
- fix npm: watch problem matcher stalling default debug task by @kevinramharak in https://github.com/yoavbls/pretty-ts-errors/pull/112
- Document the custom CSS hack by @yoavbls in https://github.com/yoavbls/pretty-ts-errors/pull/119
- Upgrade dependencies by @yoavbls in https://github.com/yoavbls/pretty-ts-errors/pull/116
- Bump braces from 3.0.2 to 3.0.3 by @dependabot in https://github.com/yoavbls/pretty-ts-errors/pull/111
Full Changelog: https://github.com/yoavbls/pretty-ts-errors/compare/v0.5.3...v0.6.0
In Memoriam ❤️
This release is dedicated to Ice, my beloved dog. May your memory continue to inspire and bring joy.
Rest in peace, Ice. 🐾
- v0.5.32024-01-07 · 2024-01-07 00:48 UTC
查看更新说明
What's Changed
- feat: Add glimmer support by @IgnaceMaes in https://github.com/yoavbls/pretty-ts-errors/pull/85
- Extend list of known error numbers by @bennycode in https://github.com/yoavbls/pretty-ts-errors/pull/84
New Contributors
- @IgnaceMaes made their first contribution in https://github.com/yoavbls/pretty-ts-errors/pull/85
- @bennycode made their first contribution in https://github.com/yoavbls/pretty-ts-errors/pull/84
Full Changelog: https://github.com/yoavbls/pretty-ts-errors/compare/v0.5.2...v0.5.3
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Pretty TypeScript Errors
Make TypeScript errors prettier and human-readable in VSCode.
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
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
.tsfiles) - JSDoc type errors (in
.jsand.jsxfiles) - React, Solid and Qwik errors (in
.tsxand.mdxfiles) - Astro, Svelte and Vue files when TypeScript is enabled (in
.astro,.svelteand.vuefiles) - Ember and Glimmer TypeScript errors and template issues reported by Glint (in
.hbs,.gjs, and.gtsfiles)
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
- 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. - 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 calledtype. - 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
Stars from stars
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.