The Built-In Transformations
Derive rather than duplicate. A near-copy of a type will eventually disagree with the original, in exactly the way a repeated author name disagrees in the SQL course. The utility types are how you avoid the copy.
The ones worth knowing.
Partial<T> every property optional, for updates.
Required<T> the opposite.
Readonly<T> every property readonly.
Pick<T, K> only those properties.
Omit<T, K> all but those.
Record<K, V> an object with those keys and values.
ReturnType<typeof fn> whatever a function returns.
That is most of what you will use. The rest can wait until you meet them.
Mark this lesson complete
Signed in, your progress follows you to every device.