ZodSchemaClassExtender
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -6,18 +6,18 @@
|
||||
export type CommonKeys<A, B> = Extract<keyof A, keyof B>
|
||||
|
||||
export type Extend<T extends readonly object[]> = (
|
||||
T extends [
|
||||
T extends readonly [
|
||||
infer Super,
|
||||
infer Self,
|
||||
...infer Rest extends object[],
|
||||
...infer Rest extends readonly object[],
|
||||
]
|
||||
? Pick<Self, CommonKeys<Self, Super>> extends Pick<Super, CommonKeys<Self, Super>>
|
||||
? Extend<[
|
||||
? Extend<readonly [
|
||||
Omit<Super, CommonKeys<Self, Super>> & Self,
|
||||
...Rest,
|
||||
]>
|
||||
: never
|
||||
: T extends [infer Self]
|
||||
: T extends readonly [infer Self]
|
||||
? Self
|
||||
: {}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user