/** * JSON Schema helpers that route through the `SchemaValidator` extension * contract, so core modules can convert opaque `Schema` instances to * JSON Schema documents without importing zod (or any other validator). * * @module schemas/json-schema */ import type { JsonSchema, JsonSchemaValidationFunction, Schema } from "../extensions/schema/index.js"; /** * Convert an opaque `Schema` to a JSON Schema document. * * Resolves the registered `SchemaValidator` and delegates to its * `toJsonSchema` implementation. Callers should pass a `Schema` produced * by `defineSchema` or any other contract-aware builder. */ export declare function schemaToJsonSchema(schema: Schema): JsonSchema; /** * Returns `true` when the schema permits `undefined`. * * Resolves the registered `SchemaValidator` and delegates to its * `isOptional` implementation. */ export declare function isOptionalSchema(schema: Schema): boolean; /** * Compile a raw JSON Schema through the registered validator extension. * * This helper is intentionally internal. Raw-schema consumers must fail * during materialization when a custom validator adapter does not implement * the optional compilation capability. */ export declare function compileJsonSchemaValidator(schema: JsonSchema): JsonSchemaValidationFunction; /** * Compile a raw JSON Schema when the registered adapter supports it. * * Older third-party adapters predate this optional capability. Callers that * only need to transmit a schema can remain compatible and defer the explicit * capability error until local validation is actually requested. */ export declare function tryCompileJsonSchemaValidator(schema: JsonSchema): JsonSchemaValidationFunction | undefined; export type { JsonSchema }; //# sourceMappingURL=json-schema.d.ts.map