feat(reflector): added a method to get type's interfaces

This commit is contained in:
vsavkin
2015-05-27 15:50:08 -07:00
parent 2c25055828
commit 34d75e8918
5 changed files with 41 additions and 3 deletions
@@ -1,4 +1,4 @@
import {Type, isPresent, global, stringify} from 'angular2/src/facade/lang';
import {Type, isPresent, global, stringify, BaseException} from 'angular2/src/facade/lang';
import {List, ListWrapper} from 'angular2/src/facade/collection';
import {GetterFn, SetterFn, MethodFn} from './types';
@@ -97,6 +97,10 @@ export class ReflectionCapabilities {
return [];
}
interfaces(type): List<any> {
throw new BaseException("JavaScript does not support interfaces");
}
getter(name: string): GetterFn { return new Function('o', 'return o.' + name + ';'); }
setter(name: string): SetterFn { return new Function('o', 'v', 'return o.' + name + ' = v;'); }