import "reflect-metadata" ; describe ( 'TestDecorators' , function ( ) { it ( "basic decorators" , function ( ) { function Path ( value ) { return function ( target , propertyKey , descriptor ) { console . log ( "FIXME propertyKey" , propertyKey ) ; let paramtypes = Reflect . getMetadata ( "design:paramtypes" , target , propertyKey ) ; console . log ( "FIXME1:" , Reflect . getMetadata ( "design:type" , target , propertyKey ) ) ; console . log ( "Within my annotation: " , paramtypes ) ; target . path = value ; console . log ( "FIXME: target" , target ) ; console . log ( "FIXME: descriptor" , descriptor ) ; } ; } class Address { public readonly city : string ; public readonly state : string ; public readonly zip : number ; constructor ( city , state , zip ) { this . city = city ; this . state = state ; this . zip = zip ; } } interface Handler < T > { handle ( value ) : void ; } class AddressHandler implements Handler < Address > { @ Path ( "/api/address" ) handle ( address ) { } } } ) ; } ) ;