export function OnChange ( ) { const sufix = 'Change' ; return function OnChangeHandler ( target , propertyKey ) : void { const _key = ` __${ propertyKey }Value` ; Object . defineProperty ( target , propertyKey , { get ( ) { return this [ _key ] ; } , set ( value ) { const prevValue = this [ _key ] ; this [ _key ] = value ; if ( prevValue !== value && this [ propertyKey + sufix ] ) { this [ propertyKey + sufix ] . emit ( value ) ; } } } ) ; } ; }