refactor(core): add a name to all decorators and other fixes

This commit is contained in:
Tobias Bosch
2016-09-12 20:30:42 -07:00
committed by Igor Minar
parent cc2873a94d
commit 42d442dcd5
12 changed files with 72 additions and 65 deletions
@@ -182,11 +182,9 @@ function convertTsickleDecoratorIntoMetadata(decoratorInvocations: any[]): any[]
return [];
}
return decoratorInvocations.map(decoratorInvocation => {
var decoratorType = decoratorInvocation.type;
var annotationCls = decoratorType.annotationCls;
var annotationArgs = decoratorInvocation.args ? decoratorInvocation.args : [];
var annotation = Object.create(annotationCls.prototype);
annotationCls.apply(annotation, annotationArgs);
return annotation;
const decoratorType = decoratorInvocation.type;
const annotationCls = decoratorType.annotationCls;
const annotationArgs = decoratorInvocation.args ? decoratorInvocation.args : [];
return new annotationCls(...annotationArgs);
});
}