Extract specific properties as optional.
Source object type
Keys to extract
Creates a new object type containing only the selected keys, all marked as optional regardless of their original required state.
type User = { id: number; name: string; email?: string; phone?: string };type Contact = ExtractFrom< User, 'email' | 'phone' >;// { email?: string; phone?: string } Copy
type User = { id: number; name: string; email?: string; phone?: string };type Contact = ExtractFrom< User, 'email' | 'phone' >;// { email?: string; phone?: string }
Extract specific properties as optional.