interface Params { [ paramName ] : number ; } interface Target { paramType : any ; controllerClass : any ; method : any ; } class ParamStore { set ( target , value ) { Reflect . defineMetadata ( target . paramType , value , target . controllerClass , target . method ) ; } get ( target ) { return Reflect . getMetadata ( target . paramType , target . controllerClass , target . method ) || { } ; } getParamTypes ( controllerClass , propertyKey ) { return Reflect . getMetadata ( 'design:paramtypes' , controllerClass , propertyKey ) ; } } export const paramStore = new ParamStore ( ) ;