refactor(injector): add @FIELD annotations to Key and Dependency

This commit is contained in:
vsavkin 2014-10-07 09:39:52 -04:00
parent df09a7c817
commit ea22cc4c7a
1 changed files with 6 additions and 1 deletions

View File

@ -1,10 +1,13 @@
import {MapWrapper} from 'facade/collection';
import {int, bool} from 'facade/lang';
import {FIELD, int, bool} from 'facade/lang';
var _allKeys = {};
var _id:int = 0;
//TODO: vsavkin: move to binding once cyclic deps are supported
@FIELD('final key:Key')
@FIELD('final asFuture:bool')
@FIELD('final lazy:bool')
export class Dependency {
constructor(key:Key, asFuture:bool, lazy:bool){
this.key = key;
@ -13,6 +16,8 @@ export class Dependency {
}
}
@FIELD('final token')
@FIELD('final id:int')
export class Key {
constructor(token, id:int) {
this.token = token;