TypeScript types · Senior · about 15 minutes
Deep partial
Write DeepPartial<T>: every property is optional at every depth. An array stays an array, with DeepPartial applied to its items. Function types stay as they are. It is the type of a patch object, for example the body of a PATCH request or a test fixture override.
Start from
// Make every property optional, at every depth.
type DeepPartial<T> = any;Hints and solution
Solve it in the app: its tests run without a year.
The hints, the solution and what an interviewer looks for opens with a year in the app. What a year includes