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

28 lines (27 loc) 1.05 kB
import type { NullSchema, NullValue } from '../../../types'; import { AbstractNode } from '../AbstractNode'; import { type SchemaNodeConstructorProps, type UnionSetValueOption } from '../type'; /** * Node class for handling null schemas. * Manages null values. */ export declare class NullNode extends AbstractNode<NullSchema, NullValue> { #private; /** * Gets the value of the null node. * @returns null or undefined */ get value(): NullValue | undefined; /** * Sets the value of the null node. * @param input - The value to set */ set value(input: NullValue | undefined); /** * Applies the input value to the null node. * @param input - The value to set * @param option - Set value options */ protected applyValue(this: NullNode, input: NullValue | undefined, option: UnionSetValueOption): void; constructor({ key, name, jsonSchema, defaultValue, onChange, parentNode, validationMode, validatorFactory, required, }: SchemaNodeConstructorProps<NullSchema>); }