export declare type Key = string | number | symbol; export interface ChildError { key: Key; error: FefeError; } export interface LeafError { type: 'leaf'; value: unknown; reason: string; } export interface BranchError { type: 'branch'; value: unknown; childErrors: ChildError[]; } export declare type FefeError = LeafError | BranchError; export declare function leafError(value: unknown, reason: string): LeafError; export declare function branchError(value: unknown, children: ChildError[]): BranchError; export declare type LeafErrorReason = { path: Key[]; reason: string; }; export declare function getLeafErrorReasons(error: FefeError): LeafErrorReason[]; export declare function getErrorString(error: FefeError): string;