0.1.2 #3
@@ -55,7 +55,7 @@ export class ZodSchemaClassExtender<
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new this.constructor(
|
return new this.constructor(
|
||||||
this.superclass,
|
this.superclass as Super,
|
||||||
|
|
||||||
Schemas as unknown as AbstractClass<
|
Schemas as unknown as AbstractClass<
|
||||||
Simplify<
|
Simplify<
|
||||||
@@ -165,7 +165,7 @@ export class ZodSchemaClassExtender<
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new this.constructor(
|
return new this.constructor(
|
||||||
this.superclass,
|
this.superclass as Super,
|
||||||
|
|
||||||
JsonifiableSchemas as unknown as AbstractClass<
|
JsonifiableSchemas as unknown as AbstractClass<
|
||||||
Simplify<
|
Simplify<
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ 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 { MobXObservableZodSchemaObject } from "./traits/MobXObservableZodSchemaObject"
|
import { MobXObservableZodSchemaObject } from "./traits/MobXObservableZodSchemaObject"
|
||||||
|
import { StaticMembers } from "./util"
|
||||||
|
|
||||||
|
|
||||||
const exp = zodSchemaClass
|
const exp = zodSchemaClass
|
||||||
@@ -47,7 +48,9 @@ const AdminUserProto = User.extend()
|
|||||||
defaultValues: v => ({ ...v, name: "Admin" as const }),
|
defaultValues: v => ({ ...v, name: "Admin" as const }),
|
||||||
})
|
})
|
||||||
.jsonifiable({
|
.jsonifiable({
|
||||||
|
jsonifySchema: (s, json) => json.extend({
|
||||||
|
prout: s.shape.prout
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user