@canard/schema-form
Version:
React-based component library that renders forms based on JSON Schema with plugin system support for validators and UI components
14 lines (13 loc) • 572 B
TypeScript
import type { JsonSchemaType } from '../../types/jsonSchema';
/**
* Type guard to check if a type is a terminal type.
* @param type - The type to check
* @returns Whether the type is a terminal type
*/
export declare const isTerminalType: (type: JsonSchemaType) => type is "string" | "number" | "boolean" | "integer" | "null";
/**
* Type guard to check if a type is a branch type.
* @param type - The type to check
* @returns Whether the type is a branch type
*/
export declare const isBranchType: (type: JsonSchemaType) => type is "object" | "array" | "virtual";