fix: Class factory now adds annotations

This commit is contained in:
Misko Hevery
2015-06-15 22:06:52 -07:00
parent cab1d0ef0f
commit bc9e482b39
2 changed files with 20 additions and 10 deletions

View File

@ -79,6 +79,11 @@ export function Class(clsDef: ClassDefinition): Type {
proto[key] = applyParams(clsDef[key], key);
}
}
if (this && this.annotations instanceof Array) {
Reflect.defineMetadata('annotations', this.annotations, constructor);
}
return <Type>constructor;
}