Create a strict subset of an object type with required and optional properties
type User = { id: number; name: string; email?: string; phone?: string };type UserSubset = StrictSubset<User, 'id', 'email' | 'phone'>;// { id: number; email?: string; phone?: string } Copy
type User = { id: number; name: string; email?: string; phone?: string };type UserSubset = StrictSubset<User, 'id', 'email' | 'phone'>;// { id: number; email?: string; phone?: string }
Create a strict subset of an object type with required and optional properties