Is it feasible for Zod to mandate that the type of a passed schema is restricted to a basic schema? I may be completely off track here, but I hope my intentions are clear in the provided example.
Many thanks.
import { ZodType, z } from "zod";
const baseSchema = z.object({baseString:z.string()})
const validChildSchema = baseSchema.extend({childString:z.string()})
const invalidChildSchema = z.object({childString:z.string()})
class baseClass<TSchema> // e.g. something like "extends ZodType<typeof baseSchema>"
{}
class childClassValid extends baseClass<typeof validChildSchema>{}
// Is there a way to modify the baseclass so this doesn't compile?
class childClassInvalid extends baseClass<typeof invalidChildSchema>{}