UNPKG

property-watch-decorator

Version:
9 lines (8 loc) 365 B
export interface SimpleChange<T> { firstChange: boolean; previousValue: T; currentValue: T; isFirstChange: () => boolean; } export declare type CallBackFunction<T> = (value: T, change?: SimpleChange<T>) => void; export declare function OnChange<T = any>(callback: CallBackFunction<T> | string): (target: any, key: string | number | symbol) => void;