UNPKG

@langchain/core

Version:
1 lines 526 B
{"version":3,"file":"enum.cjs","names":["def: ZodEnumDef"],"sources":["../../../../src/utils/zod-to-json-schema/parsers/enum.ts"],"sourcesContent":["import { ZodEnumDef } from \"zod/v3\";\n\nexport type JsonSchema7EnumType = {\n type: \"string\";\n enum: string[];\n};\n\nexport function parseEnumDef(def: ZodEnumDef): JsonSchema7EnumType {\n return {\n type: \"string\",\n enum: Array.from(def.values),\n };\n}\n"],"mappings":";;AAOA,SAAgB,aAAaA,KAAsC;AACjE,QAAO;EACL,MAAM;EACN,MAAM,MAAM,KAAK,IAAI,OAAO;CAC7B;AACF"}