fix(static_reflector): report methods with decorators in propMetadata as well

This was the behavior of our regular reflector as well, although the
method name does not imply this.

Fixes #10308
Closes #10318
This commit is contained in:
Tobias Bosch
2016-07-27 02:05:07 -07:00
parent 58d9e7fc5a
commit 367f0fd142
3 changed files with 31 additions and 3 deletions

View File

@ -94,7 +94,8 @@ export class StaticReflector implements ReflectorReader {
let classMetadata = this.getTypeMetadata(type);
let members = classMetadata ? classMetadata['members'] : {};
propMetadata = mapStringMap(members, (propData, propName) => {
let prop = (<any[]>propData).find(a => a['__symbolic'] == 'property');
let prop = (<any[]>propData)
.find(a => a['__symbolic'] == 'property' || a['__symbolic'] == 'method');
if (prop && prop['decorators']) {
return this.simplify(type, prop['decorators']);
} else {