import { Result } from 'resultage'; import { $castingError, type CastingError, type CastingErrorCode, type Extra } from './types.js'; export declare const isCastingError: (error: unknown) => error is CastingError; export declare const errorMessage: ({ code, path, extra }: Pick, prefix?: string) => string; export declare class CastingException extends Error implements CastingError { readonly [$castingError] = true; readonly name: string; readonly code: CastingErrorCode; readonly path: string[]; readonly extra: Extra; readonly reason?: string | undefined; constructor(code: CastingErrorCode, path: string[], extra: Extra); toString(): string; toJSON(): { code: CastingErrorCode; path: string[]; extra: Extra; }; } export declare const castingErr: (code: CastingErrorCode, path: string[], extra: Extra) => CastingError; export declare const castErr: (code: CastingErrorCode, path: string[], extra: Extra) => Result; export declare const replaceExpected: (expected: string, currentPath?: string[]) => (error: CastingError) => CastingError; export declare const updateError: ({ code, path, extra }: Partial) => (error: CastingError) => CastingError;