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

26 lines (25 loc) 898 B
import { BaseError, type ErrorDetails } from '@winglet/common-utils/error'; /** * Error class for schema form construction errors. * * Thrown when there are issues during the form building process, * particularly when mapping form types to input components fails. * * Currently used for: * - Invalid key patterns in FormTypeInputMap configuration * * @remarks * Error details typically include: * - path: The input path that caused the error * - error: The underlying error that occurred */ export declare class SchemaFormError extends BaseError { constructor(code: string, message: string, details?: ErrorDetails); } /** * Type guard to check if an error is a SchemaFormError instance. * * @param error - Error object to check * @returns Whether the error is a SchemaFormError instance */ export declare const isSchemaFormError: (error: unknown) => error is SchemaFormError;