makeJsonifiableSchemableClass
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Class } from "type-fest"
|
||||
import { JsonifiableObject } from "type-fest/source/jsonifiable"
|
||||
import { z } from "zod"
|
||||
import { JsonifiableSchemableConfig } from "."
|
||||
import { JsonifiableSchemableClass, JsonifiableSchemableConfig, JsonifiableSchemableObject } from "."
|
||||
import { SchemableClass, SchemableConfig } from ".."
|
||||
import { StaticMembers, parseZodTypeEffect } from "../util"
|
||||
|
||||
@@ -84,15 +84,15 @@ export function makeJsonifiableSchemableClass<
|
||||
jsonifyEffect() {
|
||||
return parseZodTypeEffect(this.jsonifySchema, this)
|
||||
}
|
||||
}
|
||||
} satisfies JsonifiableSchemableClass<typeof $jsonifiableSchemableConfig>
|
||||
|
||||
return jsonifiableClass as (
|
||||
Class<
|
||||
InstanceType<C> & InstanceType<typeof jsonifiableClass>,
|
||||
InstanceType<C> & JsonifiableSchemableObject<typeof $jsonifiableSchemableConfig>,
|
||||
ConstructorParameters<C>
|
||||
> &
|
||||
StaticMembers<C> &
|
||||
StaticMembers<typeof jsonifiableClass>
|
||||
StaticMembers<JsonifiableSchemableClass<typeof $jsonifiableSchemableConfig>>
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user