2019-11-18 22:38:51 +01:00
|
|
|
type DeepPartial<T> = {
|
|
|
|
[P in keyof T]?: T[P] extends Array<infer U>
|
|
|
|
? Array<DeepPartial<U>>
|
2019-11-18 23:00:11 +01:00
|
|
|
: T[P] extends ReadonlyArray<infer V>
|
|
|
|
? ReadonlyArray<DeepPartial<V>>
|
|
|
|
: DeepPartial<T[P]>;
|
2019-11-18 22:38:51 +01:00
|
|
|
};
|