Files
SnowLuma/.pnpm-store/v11/files/1b/c124600a0ed2487778706e223f5c38d70b88892b467afab3d975e249398b68041d56128f1c73c5164f5a7ccae76851d7bc79da1f7b84efad24139bd2396c90
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

24 lines
1007 B
Plaintext

import { ZodDiscriminatedUnionDef, ZodUnionDef } from "zod/v3";
import { JsonSchema7Type } from "../parseTypes.js";
import { Refs } from "../Refs.js";
export declare const primitiveMappings: {
readonly ZodString: "string";
readonly ZodNumber: "number";
readonly ZodBigInt: "integer";
readonly ZodBoolean: "boolean";
readonly ZodNull: "null";
};
type JsonSchema7Primitive = (typeof primitiveMappings)[keyof typeof primitiveMappings];
export type JsonSchema7UnionType = JsonSchema7PrimitiveUnionType | JsonSchema7AnyOfType;
type JsonSchema7PrimitiveUnionType = {
type: JsonSchema7Primitive | JsonSchema7Primitive[];
} | {
type: JsonSchema7Primitive | JsonSchema7Primitive[];
enum: (string | number | bigint | boolean | null)[];
};
type JsonSchema7AnyOfType = {
anyOf: JsonSchema7Type[];
};
export declare function parseUnionDef(def: ZodUnionDef | ZodDiscriminatedUnionDef<any, any>, refs: Refs): JsonSchema7PrimitiveUnionType | JsonSchema7AnyOfType | undefined;
export {};