Make all properties of a class optional for partial construction.
The class type
Useful for factory functions, builder patterns, or when only a subset of properties needs to be provided at initialization.
class User { id: number; name: string; email: string; }type PartialUser = PartialClass< User >;// { id?: number; name?: string; email?: string; } Copy
class User { id: number; name: string; email: string; }type PartialUser = PartialClass< User >;// { id?: number; name?: string; email?: string; }
Make all properties of a class optional for partial construction.