Skip to content

Type Alias: Prettify<TypeParameter>

Prettify<TypeParameter> = { [KeyType in keyof TypeParameter]: TypeParameter[KeyType] } & object

Type utility that expands object types to show their full structure in IDE tooltips. Useful for making complex intersection types more readable in development.

Type Parameters

TypeParameter

TypeParameter

The type to prettify

Example

typescript
type User = { name: string }
type WithId = { id: number }

// Without Prettify: User & WithId (shows intersection)
type UserWithId = User & WithId

// With Prettify: { name: string; id: number } (shows expanded structure)
type PrettyUserWithId = Prettify<User & WithId>

Released under the MIT License.