import { Injectable } from '@angular/core' ; export function MyDecorator ( type ) { return function ( target ) { _reflect . defineMetadata ( 'type' , type , target ) ; } ; } @ Injectable ( { providedIn : 'root' } ) @ LogClass ( ) export class MyService { }