import type { Constructable } from '@aurelia/kernel'; import type { IConnectable } from '@aurelia/runtime'; export type IDepCollectionFn = (vm: TType, watcher: IConnectable) => TReturn; export type IWatcherCallback = (this: TType, newValue: TValue, oldValue: TValue, vm: TType) => unknown; export interface IWatchDefinition { expression: PropertyKey | IDepCollectionFn; callback: keyof T | IWatcherCallback; flush: 'async' | 'sync'; } export type IWatchOptions = { flush?: 'async' | 'sync'; }; type AnyMethod = (...args: unknown[]) => R; type WatchClassDecorator = (target: Constructable, context: ClassDecoratorContext>) => void; type WatchMethodDecorator = (target: TV, context: ClassMethodDecoratorContext) => void; type MethodsOf = { [Key in keyof Type]: Type[Key] extends AnyMethod ? Key : never; }[keyof Type]; export declare function watch(expressionOrPropertyAccessFn: PropertyKey, changeHandlerOrCallback: MethodsOf | IWatcherCallback, options?: IWatchOptions): WatchClassDecorator; export declare function watch(expressionOrPropertyAccessFn: IDepCollectionFn, changeHandlerOrCallback: MethodsOf | IWatcherCallback, options?: IWatchOptions): WatchClassDecorator; export declare function watch(expressionOrPropertyAccessFn: PropertyKey | IDepCollectionFn, options?: IWatchOptions): WatchMethodDecorator; export declare const Watch: Readonly<{ add(Type: Constructable, definition: IWatchDefinition): void; getDefinitions(Type: Constructable): IWatchDefinition[]; }>; export {}; //# sourceMappingURL=watch.d.ts.map