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
📺 Watch This
🛠 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: