UNPKG

@canard/schema-form

Version:

React-based component library that renders forms based on JSON Schema with plugin system support for validators and UI components

17 lines (16 loc) 822 B
import type { BooleanSchema } from '../../../../../../types'; /** * Intersects two boolean schema objects, merging their constraints and properties. * * This function handles the intersection of boolean-specific schema properties including: * - Enum value intersections (boolean values) * - Const value intersections * - Required field unions * - Metadata field handling (first-win and overwrite strategies) * * @param base - The base boolean schema to modify and return * @param source - The source boolean schema to intersect with base * @returns The modified base schema with intersected properties * @throws {JsonSchemaError} When enum intersections are empty or const values conflict */ export declare const intersectBooleanSchema: (base: BooleanSchema, source: Partial<BooleanSchema>) => BooleanSchema;