@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.13 kB
TypeScript
import type { BooleanSchema, BooleanValue } from '../../../types';
import { AbstractNode } from '../AbstractNode';
import { type SchemaNodeConstructorProps, type UnionSetValueOption } from '../type';
/**
* Node class for handling boolean schemas.
* Manages and parses boolean values.
*/
export declare class BooleanNode extends AbstractNode<BooleanSchema, BooleanValue> {
#private;
/**
* Gets the value of the boolean node.
* @returns Boolean value or undefined
*/
get value(): BooleanValue | undefined;
/**
* Sets the value of the boolean node.
* @param input - The boolean value to set
*/
set value(input: BooleanValue | undefined);
/**
* Applies the input value to the boolean node.
* @param input - The boolean value to set
* @param option - Set value options
*/
protected applyValue(this: BooleanNode, input: BooleanValue | undefined, option: UnionSetValueOption): void;
constructor({ key, name, jsonSchema, defaultValue, onChange, parentNode, validationMode, validatorFactory, required, }: SchemaNodeConstructorProps<BooleanSchema>);
}