If your class has a Decorator, then the plugin skips the transformation.
It works for everything else. Tested changing the /* @ngInject */
comment to different places.
class DashboardController {
/* @ngInject */
constructor(
private $q: ng.IQService,
private attendanceEventService: IAttendanceEventService,
private caseService: CaseService,
private holidayService: HolidayService,
private attendanceService: IAttendanceService,
private employeeService: EmployeeService
) {
}
@AuthorizeDecorator.authorize(['getSomething'])
getSomething() {
...
}
}
var dashboard__dec, dashboard__class;
function dashboard__applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
var desc = {};
Object['ke' + 'ys'](descriptor).forEach(function(key) {
desc[key] = descriptor[key];
});
desc.enumerable = !!desc.enumerable;
desc.configurable = !!desc.configurable;
if ('value' in desc || desc.initializer) {
desc.writable = true;
}
desc = decorators.slice().reverse().reduce(function(desc, decorator) {
return decorator(target, property, desc) || desc;
}, desc);
if (context && desc.initializer !== void 0) {
desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
desc.initializer = undefined;
}
if (desc.initializer === void 0) {
Object['define' + 'Property'](target, property, desc);
desc = null;
}
return desc;
}
let DashboardController = (dashboard__dec = identity[b].authorize(['getSomething']), (
dashboard__class = class DashboardController {
/*@ngInject*/
constructor($q, attendanceEventService, caseService, holidayService, attendanceService, employeeService) {
this.$q = $q;
this.attendanceEventService = attendanceEventService;
this.caseService = caseService;
this.holidayService = holidayService;
this.attendanceService = attendanceService;
this.employeeService = employeeService;
}
getSomething() {
// ...
}
}, (dashboard__applyDecoratedDescriptor(dashboard__class.prototype,
\"getSomething\",
[dashboard__dec],
Object.getOwnPropertyDescriptor(dashboard__class.prototype, \"getSomething\"),
dashboard__class.prototype)), dashboard__class));