I like the tricks :) – Kasia
You can debug a static type by forcing the resolution of type aliases with a utility type.
type Persisted = { id: number } type User = { name: string } type PersistedUser = Persisted & User // ⛔️ ^? Persisted & User
type Persisted = { id: number } type User = { name: string } type PersistedUser = Persisted & User type Expand<Type> = { [Key in keyof Type]: Type[Key] } type Expanded = Expand<PersistedUser> // ✅ ^? { id: number, name: string }
Crafted with 💛 by Riccardo