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 picks only the 'name' and 'age' properties.
type NameAndAge = [1]<User, 'name' | 'age'>;
The Pick utility type selects specific properties from a type.
Fix the error in the code to make all properties readonly.
type ReadonlyUser = [1]<User>;The Readonly utility type makes all properties immutable.
Fill both blanks to create a type that excludes 'password' and makes the rest required.
type SafeUser = [1]<User> & [2]<User, 'password'>;
Omit removes the 'password' property, and Required makes the rest required.
Fill all three blanks to create a type that maps the keys 'active' and 'admin' to boolean and makes them readonly.
type Flags = Readonly<[1]<[2], [3]>>;
Record creates a type with keys mapped to boolean values, and Readonly makes them immutable.