import ComponentHook from '../../component_hook.js'; import type ComponentContext from '../../component_context.js'; /** * Feature to support validation in components * * This feature handles validation errors by: * 1. Catching ValidationException in the exception hook * 2. Storing errors in the component's error bag * 3. Sharing errors with views during render * 4. Persisting/restoring errors in the component memo * * Errors are only persisted for component properties, not for custom * validators that don't correspond to component properties. */ export declare class SupportValidation extends ComponentHook { #private; /** * Handle hydration - restore validation errors from memo */ hydrate(_data: any, memo: any, _context?: ComponentContext): Promise; /** * Handle render - share errors with views * Returns a callback to revert the sharing after render */ render(...params: any[]): Promise; /** * Handle dehydration - persist validation errors to memo * Only persists errors that correspond to component properties */ dehydrate(context: ComponentContext): Promise; /** * Handle exception - catch ValidationException and set error bag */ exception(...params: any[]): Promise; /** * Normalize error messages to consistent format */ private normalizeErrorMessages; /** * Handle property update - validate property if it has @validate decorator with onUpdate: true */ update(propertyName: string, _fullPath: string, _newValue: any): Promise; /** * Check if a component has a property with the given name */ private hasComponentProperty; }