feat(lib/utils/types): add DeepPartial
This commit is contained in:
parent
4df920009e
commit
291a4dfaa4
1 changed files with 3 additions and 0 deletions
|
|
@ -2,3 +2,6 @@ export type Nullish = null | undefined
|
|||
export type If<T, Then, Else> = T extends true ? Then : Else
|
||||
export type AnyObject = Record<any, any>
|
||||
export type LogicalOr<T1, T2> = T1 extends true ? true : T2 extends true ? true : false
|
||||
export type DeepPartial<T> = {
|
||||
[K in keyof T]?: T[K] extends AnyObject ? DeepPartial<T[K]> : T[K]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue