MobXObservableZodSchemaObject
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Julien Valverdé
2024-02-25 05:49:50 +01:00
parent 93edcde258
commit 8ca2805f4f
2 changed files with 3 additions and 3 deletions

View File

@@ -2,7 +2,7 @@ import { Implements } from "@thilawyn/traitify-ts"
import { z } from "zod" import { z } from "zod"
import { zodSchemaClass } from "./builders/ZodSchemaClassBuilder" import { zodSchemaClass } from "./builders/ZodSchemaClassBuilder"
import { dejsonify, jsonify } from "./schema/jsonify" import { dejsonify, jsonify } from "./schema/jsonify"
import { ObservableZodSchemaObject } from "./traits/ObservableZodSchemaObject" import { MobXObservableZodSchemaObject } from "./traits/MobXObservableZodSchemaObject"
const exp = zodSchemaClass const exp = zodSchemaClass
@@ -26,7 +26,7 @@ const exp = zodSchemaClass
id: dejsonify.bigint(s.shape.id) id: dejsonify.bigint(s.shape.id)
}), }),
}) })
.expresses(ObservableZodSchemaObject) .expresses(MobXObservableZodSchemaObject)
.build() .build()
@exp.staticImplements @exp.staticImplements

View File

@@ -4,7 +4,7 @@ import { makeObservable, observable } from "mobx"
import { z } from "zod" import { z } from "zod"
export const ObservableZodSchemaObject = trait export const MobXObservableZodSchemaObject = trait
.staticAbstract(Super => class extends Super { .staticAbstract(Super => class extends Super {
declare readonly schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, object, object> declare readonly schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, object, object>
}) })