Complete the code to create a type that makes all properties optional.
type PartialUser = [1]<User>;The Partial utility type makes all properties of a type optional.
Complete the code to create a type that makes all properties required.
type CompleteUser = [1]<User>;The Required utility type makes all properties of a type required.
Fix the error in the code to create a type with only the 'name' property from User.
type UserName = [1]<User, 'name'>;
The Pick utility type selects specific properties from a type.
Fill both blanks to create a type that excludes 'password' and makes remaining properties readonly.
type SafeUser = [1]<[2]<User, 'password'>>;
First, Omit removes the 'password' property, then Readonly makes the rest immutable.
Fill all three blanks to create a type that makes 'email' optional, picks 'name' and 'email', and makes them readonly.
type CustomUser = [1]<[2]<User, 'name' | 'email'>> & { email?: [3] };
We pick 'name' and 'email', make them readonly, and then override 'email' to be optional with type string.