export type JsonSchema = Record; /** A subschema position: a schema object or the boolean schema forms. */ export type SubschemaValue = JsonSchema | boolean; export declare function isJsonSchemaObject(value: unknown): value is JsonSchema; /** * Sets `target[key]` as an own property, the way `JSON.parse` does. Plain * assignment of a property named `__proto__` replaces the object's prototype * instead, so a schema map built that way loses the property. */ export declare function setOwnProperty(target: JsonSchema, key: string, value: unknown): void; export interface SubschemaChild { value: SubschemaValue; /** JSON-pointer-style path segment(s) from the parent, e.g. `/properties/a`. */ pointer: string; keyword: string; } /** The direct subschemas of one schema node, in a stable order. */ export declare function subschemasOf(schema: JsonSchema): SubschemaChild[]; /** * Replaces subschemas in place, depth first: `rewrite` sees each child and * returns what should stand in its position; the result is then descended * into. `schema` must be an acyclic tree the caller owns. */ export declare function rewriteSubschemas(schema: JsonSchema, rewrite: (value: SubschemaValue, keyword: string) => SubschemaValue): void; /** * Visits `schema` and every subschema beneath it, depth first, with the JSON * pointer of each position. Value-bearing keywords (`const`, `enum`, * `default`, `examples`) are data, not schemas, and are never entered. */ export declare function walkSubschemas(schema: SubschemaValue, visit: (node: SubschemaValue, pointer: string, keyword?: string) => void, pointer?: string, keyword?: string, ancestors?: Set): void;