extendSchemableClass work
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:
@@ -1,5 +1,5 @@
|
||||
import { z } from "zod"
|
||||
import { extendSchemable } from "."
|
||||
import { extendSchemableClass } from "."
|
||||
|
||||
|
||||
const Test1Schema = z.object({ prout: z.string() })
|
||||
@@ -13,7 +13,7 @@ class Test1 {
|
||||
prout: string = "heugneu"
|
||||
}
|
||||
|
||||
const Test2 = extendSchemable(
|
||||
const Test2 = extendSchemableClass(
|
||||
Test1,
|
||||
schema => schema.extend({ prout: z.literal("ruquier"), ruquier: z.number() }),
|
||||
() => ({ prout: "ruquier" as const }),
|
||||
|
||||
Reference in New Issue
Block a user