Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Prettify TypeScript: Better Type PreviewsNew to Visual Studio Code? Get it now.
Prettify TypeScript: Better Type Previews

Prettify TypeScript: Better Type Previews

Myles Murphy

|
58,173 installs
| (20) | Free
View "prettified" and nested types in hover tooltips.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Prettify TypeScript

Get useful type information where you need it.

Installs GitHub Repo stars Version License

✨ Overview

Prettify TS is a Visual Studio Code extension that enhances your TypeScript development experience. It provides better hover previews for TypeScript types, classes, interfaces, and more, formatted in a more readable and highly configurable way.

📸 Example

Example Screenshot

📺 Watch This

Watch Demo Video

🛠 Features

  • Prettified Type Hovers – Enhanced and formatted hover displays for interfaces, aliases, functions, unions, arrays, and more.
  • Toggle Command – Use Toggle Preview to quickly enable or disable prettified previews.
  • Copy Commands – Use Copy Prettified Type or Copy Fully Prettified Type to grab the prettified result to your clipboard.
  • Highly Configurable – Fine-tune output style, max depth, expansion behavior, and character limits.

⚙️ Extension Settings

Setting Description
Type Indentation Controls the indentation level of types.
Max Depth Sets the maximum depth to which types should be expanded.
Max Properties Limits the number of properties displayed for each type. Excess properties will be displayed with ellipsis.
Max Sub-Properties Limits the number of sub-properties (on nested objects) displayed for each property. Excess will be shown as ellipsis.
Max Union Members Limits the number of union members shown per union. Excess members will be displayed with ellipsis.
Max Function Signatures Limits the number of function signatures shown. Excess signatures will be replaced with ellipsis.
Unwrap Functions If enabled, expands function parameter and return types.
Unwrap Arrays If enabled, expands the element types of arrays.
Unwrap Generic Arguments Type Names A list of generic type names whose arguments should be unwrapped instead of using their resolved output (e.g., Promise).
Hide Private Properties If enabled, hides properties or methods marked private.
Skipped Type Names List of type names that should not be expanded. Generics are supported and replaced with ellipses (e.g., ZodObject<...>).
Max Characters Sets a maximum character limit for output. If exceeded, the result will be truncated.

🧪 Example Use Cases

  • Inspect deeply nested utility types or conditional types.
  • Preview large interface definitions cleanly.
  • Debug inferred generic types or function overloads at a glance.

🚫 Sidebar View (Deprecated)

As of v0.1.0, Prettify TS focuses on hover previews only and no longer includes a sidebar Type View.

If you're looking for a sidebar-based type explorer, check out:

  • TypeScript Explorer
  • ts-type-expand

🤝 Contributing

Bug reports, suggestions, and pull requests are welcome. Visit GitHub Issues to contribute.

🙏 Acknowledgements

  • @mattpocock – original inspiration via Prettify Type
  • @willbattel – early beta testing and feedback
  • @mattiamanzati – TypeScript compiler insights

📝 License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft