const loggable = Symbol ( 'loggable' ) ; export function Loggable ( isLoggable = true ) { return function ( target ) { Reflect . defineMetadata ( loggable , isLoggable , target ) ; return target ; } ; } Loggable . isLoggable = function ( target ) { return ! ! Reflect . getMetadata ( loggable , target . constructor ) ; } ;