Accept generated parse-style schemas in CultCacheTS
This commit is contained in:
parent
be0a96db7b
commit
b7cc33a846
6 changed files with 86 additions and 14 deletions
|
|
@ -1,8 +1,11 @@
|
|||
import type { ZodType } from "zod";
|
||||
import type {
|
||||
AnyCultCacheDocumentDefinition,
|
||||
CultCacheDocumentDefinition,
|
||||
CultCacheDocumentRegistry,
|
||||
CultCacheSchema,
|
||||
} from "./types";
|
||||
|
||||
import type { AnyCultCacheDocumentDefinition, CultCacheDocumentDefinition, CultCacheDocumentRegistry } from "./types";
|
||||
|
||||
export function defineDocumentType<TSchema extends ZodType>(
|
||||
export function defineDocumentType<TSchema extends CultCacheSchema>(
|
||||
definition: CultCacheDocumentDefinition<TSchema>,
|
||||
): CultCacheDocumentDefinition<TSchema> {
|
||||
if (!definition.type || definition.type.trim().length === 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue