import { getMetadataStorage } from '../metadata' ; export function ObservableProps ( name ? ) { return ( prototype , propertyKey ) => { let prop = name ; if ( prop === undefined ) { prop = String ( propertyKey ) ; if ( prop . endsWith ( '$' ) ) { prop = prop . slice ( 0 , Math . max ( 0 , prop . length - 1 ) ) ; } } getMetadataStorage ( ) . collectPropsField ( { name : propertyKey , prop , target : prototype . constructor , observable : true , } ) ; } ; }