本页还没有译文
本页 8 段还没译成Français,下面显示的是英文原文。SchemaInput
还没翻译译自英文(tanstack.com)本页 8 段都还没译
type SchemaInput =
| StandardJSONSchemaV1<any, any>
| StandardSchemaV1<any, any>
| JSONSchema;Defined in: packages/ai/src/types.ts:173
Union type for schema input - can be any Standard Schema compliant validator, any Standard JSON Schema compliant schema, or a plain JSONSchema object.
Standard JSON Schema compliant libraries (carry the JSON-schema converter):
- Zod v4.2+ (natively supports StandardJSONSchemaV1)
- ArkType v2.1.28+ (natively supports StandardJSONSchemaV1)
- Valibot v1.2+ (via
toStandardJsonSchema()from@valibot/to-json-schema)
StandardSchemaV1 covers libraries whose published types only expose the
validator surface — Zod's core $ZodType['~standard'] is currently typed
as StandardSchemaV1.Props even though the runtime attaches the
jsonSchema converter, so this branch is what makes InferSchemaType
recover the inferred type for callers using z.ZodType<T>.
See
AI 翻译查看英文原文