0.1.2 #3
@@ -2,7 +2,7 @@ import { Implements } from "@thilawyn/traitify-ts"
|
||||
import { z } from "zod"
|
||||
import { zodSchemaClass } from "./builders/ZodSchemaClassBuilder"
|
||||
import { dejsonify, jsonify } from "./schema/jsonify"
|
||||
import { ObservableZodSchemaObject } from "./traits/ObservableZodSchemaObject"
|
||||
import { MobXObservableZodSchemaObject } from "./traits/MobXObservableZodSchemaObject"
|
||||
|
||||
|
||||
const exp = zodSchemaClass
|
||||
@@ -26,7 +26,7 @@ const exp = zodSchemaClass
|
||||
id: dejsonify.bigint(s.shape.id)
|
||||
}),
|
||||
})
|
||||
.expresses(ObservableZodSchemaObject)
|
||||
.expresses(MobXObservableZodSchemaObject)
|
||||
.build()
|
||||
|
||||
@exp.staticImplements
|
||||
|
||||
@@ -4,7 +4,7 @@ import { makeObservable, observable } from "mobx"
|
||||
import { z } from "zod"
|
||||
|
||||
|
||||
export const ObservableZodSchemaObject = trait
|
||||
export const MobXObservableZodSchemaObject = trait
|
||||
.staticAbstract(Super => class extends Super {
|
||||
declare readonly schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, object, object>
|
||||
})
|
||||
Reference in New Issue
Block a user