@langchain/core
Version:
Core LangChain.js abstractions and schemas
1 lines • 1.99 kB
Source Map (JSON)
{"version":3,"file":"json_schema.d.cts","names":["toJSONSchema","InteropZodType","JsonSchema7Type","JSONSchema","deepCompareStrict","Validator","ToJSONSchemaParams","Parameters","NonNullable","toJsonSchema","validatesOnlyStrings","JsonSchema7ArrayType","JsonSchema7ObjectType","JsonSchema7StringType","JsonSchema7NumberType","JsonSchema7NullableType"],"sources":["../../src/utils/json_schema.d.ts"],"sourcesContent":["import { toJSONSchema } from \"zod/v4/core\";\nimport { InteropZodType } from \"./types/zod.js\";\nimport { type JsonSchema7Type as JSONSchema } from \"./zod-to-json-schema/index.js\";\nexport { deepCompareStrict, Validator } from \"@cfworker/json-schema\";\nexport type ToJSONSchemaParams = NonNullable<Parameters<typeof toJSONSchema>[1]>;\n/**\n * Converts a Zod schema or JSON schema to a JSON schema.\n * @param schema - The schema to convert.\n * @param params - The parameters to pass to the toJSONSchema function.\n * @returns The converted schema.\n */\nexport declare function toJsonSchema(schema: InteropZodType | JSONSchema, params?: ToJSONSchemaParams): JSONSchema;\n/**\n * Validates if a JSON schema validates only strings. May return false negatives in some edge cases\n * (like recursive or unresolvable refs).\n *\n * @param schema - The schema to validate.\n * @returns `true` if the schema validates only strings, `false` otherwise.\n */\nexport declare function validatesOnlyStrings(schema: unknown): boolean;\nexport { type JsonSchema7Type, type JsonSchema7Type as JSONSchema, type JsonSchema7ArrayType, type JsonSchema7ObjectType, type JsonSchema7StringType, type JsonSchema7NumberType, type JsonSchema7NullableType, } from \"./zod-to-json-schema/index.js\";\n//# sourceMappingURL=json_schema.d.ts.map"],"mappings":";;;;;;;;;;;KAIYM,kBAAAA,GAAqBE,YAAYD,kBAAkBP;;;;;;;AAAnDM,iBAOYG,YAAAA,CAPM,MAAA,EAOeR,cAPf,GAOgCE,eAPhC,EAAA,MAAA,CAAA,EAOqDG,kBAPrD,CAAA,EAO0EH,eAP1E;;;;AAAc;AAO5C;;;AAAmFG,iBAQ3DI,oBAAAA,CAR2DJ,MAAAA,EAAAA,OAAAA,CAAAA,EAAAA,OAAAA"}