This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { ImplStatic, trait } from "@thilawyn/traitify-ts"
|
||||
import { AbstractClass, Class, HasRequiredKeys } from "type-fest"
|
||||
import { Class, HasRequiredKeys } from "type-fest"
|
||||
import { z } from "zod"
|
||||
import { StaticMembers, parseZodSchemaEffect, stripZodObjectDefaults } from "../util"
|
||||
|
||||
@@ -85,13 +85,24 @@ export const ZodSchemaObject = <
|
||||
}
|
||||
|
||||
|
||||
static extend<
|
||||
Self extends AbstractClass<ZodSchemaObject> & ImplStatic<typeof ZodSchemaObject>
|
||||
>(
|
||||
this: Self
|
||||
) {
|
||||
// static extend<
|
||||
// Self extends AbstractClass<ZodSchemaObject> & ImplStatic<typeof ZodSchemaObject>,
|
||||
|
||||
}
|
||||
// ExtendedT extends z.ZodRawShape,
|
||||
// ExtendedCatchall extends z.ZodTypeAny,
|
||||
// ExtendedValues extends Values,
|
||||
// ExtendedPartialValues extends Partial<ExtendedValues>,
|
||||
// >(
|
||||
// this: Self,
|
||||
|
||||
// schemaWithDefaults: (
|
||||
// schemaWithDefaults: typeof this.schemaWithDefaults
|
||||
// ) => z.ZodObject<ExtendedT, "strip", ExtendedCatchall, ExtendedValues, ExtendedPartialValues>,
|
||||
// ) {
|
||||
// return expression
|
||||
// .extends(this)
|
||||
// .expresses(ZodSchemaObject(schemaWithDefaults(this.schemaWithDefaults)))
|
||||
// }
|
||||
}
|
||||
|
||||
return ZodSchemaObject as Class<ZodSchemaObject & Values> & StaticMembers<typeof ZodSchemaObject>
|
||||
|
||||
Reference in New Issue
Block a user