This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { expression } from "@thilawyn/traitify-ts"
|
||||
import { NoInfer } from "effect/Types"
|
||||
import { AbstractClass, Class } from "type-fest"
|
||||
import { AbstractClass } from "type-fest"
|
||||
import { z } from "zod"
|
||||
import { InstantiableZodSchemaObject } from "./traits/InstantiableZodSchemaObject"
|
||||
import { StaticMembers } from "./util"
|
||||
import { Extend, StaticMembers } from "./util"
|
||||
|
||||
|
||||
export function ZodSchemaClassOf<
|
||||
@@ -36,11 +36,19 @@ export function ZodSchemaClassOf<
|
||||
.expresses(InstantiableZodSchemaObject)
|
||||
.build()
|
||||
|
||||
return exp.extends as Class<
|
||||
InstanceType<typeof exp.extends> & Values,
|
||||
return exp.extends as AbstractClass<
|
||||
Extend<[
|
||||
InstanceType<Superclass>,
|
||||
InstanceType<typeof exp.extends>,
|
||||
Values,
|
||||
]>,
|
||||
|
||||
ConstructorParameters<typeof exp.extends>
|
||||
> &
|
||||
StaticMembers<typeof exp.extends>
|
||||
Extend<[
|
||||
StaticMembers<Superclass>,
|
||||
StaticMembers<typeof exp.extends>,
|
||||
]>
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user