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) 356 B
import type { JsonSchemaWithVirtual } from '../../../types'; /** * Returns default value from JSON Schema's default property or based on type * @param jsonSchema - JSON Schema * @returns Default value */ export declare const getDefaultValue: <Schema extends { type?: JsonSchemaWithVirtual["type"]; default?: any; }>(jsonSchema: Schema) => any;