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

View File

@ -11,7 +11,5 @@ export function getTypeOf(instance: any /** TODO #9100 */) {
}
export function instantiateType(type: Function, params: any[] = []) {
var instance = Object.create(type.prototype);
instance.constructor.apply(instance, params);
return instance;
return new (<any>type)(...params);
}