This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { expression } from "@thilawyn/traitify-ts"
|
||||
import { AbstractClass } from "type-fest"
|
||||
import { AbstractClass, Simplify } from "type-fest"
|
||||
import { z } from "zod"
|
||||
import { ExtendableZodSchemaObject } from "./traits/ExtendableZodSchemaObject"
|
||||
import { InstantiableZodSchemaObject } from "./traits/InstantiableZodSchemaObject"
|
||||
@@ -36,18 +36,19 @@ export function ZodSchemaClassOf<
|
||||
return expression
|
||||
.extends(Schemas as unknown as (
|
||||
AbstractClass<
|
||||
InstanceType<typeof of> &
|
||||
Extend<[
|
||||
InstanceType<typeof Schemas>,
|
||||
Values,
|
||||
]>,
|
||||
InstanceType<Superclass> &
|
||||
Simplify<
|
||||
Extend<[Schemas, Values]>
|
||||
>,
|
||||
|
||||
ConstructorParameters<typeof Schemas>
|
||||
> &
|
||||
Extend<[
|
||||
StaticMembers<typeof of>,
|
||||
StaticMembers<typeof Schemas>,
|
||||
]>
|
||||
Simplify<
|
||||
Extend<[
|
||||
StaticMembers<Superclass>,
|
||||
StaticMembers<typeof Schemas>,
|
||||
]>
|
||||
>
|
||||
))
|
||||
.expresses(
|
||||
InstantiableZodSchemaObject,
|
||||
|
||||
@@ -5,6 +5,7 @@ import { ZodSchemaClass } from "./ZodSchemaClass"
|
||||
|
||||
const TestExp = ZodSchemaClass({
|
||||
schema: z.object({
|
||||
/** Object ID */
|
||||
id: z.bigint(),
|
||||
name: z.string(),
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user