Extract specific properties as optional
type User = { id: number; name: string; email?: string; phone?: string };type UserContact = ExtractFrom<User, 'email' | 'phone'>;// { email?: string; phone?: string } Copy
type User = { id: number; name: string; email?: string; phone?: string };type UserContact = ExtractFrom<User, 'email' | 'phone'>;// { email?: string; phone?: string }
Extract specific properties as optional