This commit is contained in:
@@ -10,7 +10,7 @@ import { MobXObservableZodSchemaObject } from "./traits/MobXObservableZodSchemaO
|
|||||||
const userExp = ZodSchemaClass(
|
const userExp = ZodSchemaClass(
|
||||||
z.object({
|
z.object({
|
||||||
/** User ID */
|
/** User ID */
|
||||||
id: s.effect.option.option(z.bigint()).default(Option.none()),
|
id: s.effect.option(z.bigint()).default(Option.none()),
|
||||||
|
|
||||||
/** Username */
|
/** Username */
|
||||||
name: z.string(),
|
name: z.string(),
|
||||||
@@ -31,11 +31,11 @@ const userInstEffect = User.createEffect({ id: Option.some(1n), name: "User" })
|
|||||||
|
|
||||||
const jsonifiedUserExp = JsonifiedZodSchemaClass(User, {
|
const jsonifiedUserExp = JsonifiedZodSchemaClass(User, {
|
||||||
jsonifySchema: schema => schema.extend({
|
jsonifySchema: schema => schema.extend({
|
||||||
id: s.effect.jsonify.option.option(schema.shape.id, s.jsonify.bigint)
|
id: s.effect.option.jsonify(schema.shape.id, s.jsonify.bigint)
|
||||||
}),
|
}),
|
||||||
|
|
||||||
dejsonifySchema: schema => schema.extend({
|
dejsonifySchema: schema => schema.extend({
|
||||||
id: s.effect.dejsonify.option.option(schema.shape.id, s.dejsonify.bigint)
|
id: s.effect.option.dejsonify(schema.shape.id, s.dejsonify.bigint)
|
||||||
}),
|
}),
|
||||||
}).build()
|
}).build()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user