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

11 lines (10 loc) 441 B
import type { JsonSchema } from '../../../../../types'; /** * Determines the cloning depth limit based on the JSON Schema. * Object schemas need deeper cloning (depth 3), array schemas need medium depth (depth 2), * and primitive types need shallow cloning (depth 1). * * @param schema - The JSON Schema * @returns The cloning depth limit for the given schema */ export declare const getCloneDepth: (schema: JsonSchema) => 1 | 2 | 3;