Tests
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Julien Valverdé
2024-03-17 12:53:34 +01:00
parent 73303a1748
commit 2a23259b3e

View File

@@ -2,6 +2,7 @@ import { Implements } from "@thilawyn/traitify-ts"
import { z } from "zod" import { z } from "zod"
import { ZodSchemaClass } from "./ZodSchemaClass" import { ZodSchemaClass } from "./ZodSchemaClass"
import { MobXObservableZodSchemaObject } from "./traits/MobXObservableZodSchemaObject" import { MobXObservableZodSchemaObject } from "./traits/MobXObservableZodSchemaObject"
import { stripZodObjectDefaults } from "./util"
// const exp = zodSchemaClass // const exp = zodSchemaClass
@@ -43,6 +44,16 @@ const exp = ZodSchemaClass(
.expresses(MobXObservableZodSchemaObject) .expresses(MobXObservableZodSchemaObject)
.build() .build()
const test = stripZodObjectDefaults(
z.object({
/** User ID */
id: z.bigint().default(-1n),
/** Username */
name: z.string(),
})
)
@exp.staticImplements @exp.staticImplements
class User extends exp.extends implements Implements<typeof exp> {} class User extends exp.extends implements Implements<typeof exp> {}