import { VLogger } from "./util/VLogger"; import { WatcherDefinition } from "./VWatcherOptions"; /** * Manages watchers for reactive property observation. * Provides Vue.js-like watch functionality for tracking property changes. */ export declare class VWatcher { #private; /** * Creates a new VWatcher instance. * @param logger Optional logger instance for debugging. */ constructor(logger?: VLogger); /** * Registers a watcher for a property path. * @param path The property path to watch (e.g., "count", "user.name"). * @param definition The watcher definition (callback function or options object). * @param getCurrentValue A function that returns the current value of the property. */ register(path: string, definition: WatcherDefinition, getCurrentValue: (path: string) => any): void; /** * Checks all watchers against the current changes and triggers callbacks as needed. * @param changes The list of changed property paths. * @param getValue A function that returns the current value of a property. * @param context The context object to use as 'this' when calling handlers. */ notify(changes: string[], getValue: (path: string) => any, context: any): void; /** * Updates the cached old values for all watchers. * This should be called after processing to ensure old values are current. * @param getValue A function that returns the current value of a property. */ updateCachedValues(getValue: (path: string) => any): void; /** * Clears all registered watchers. */ clear(): void; /** * Gets the number of registered watchers. */ get count(): number; }