From ea22cc4c7ab33d008fbb649aa3a568ccb5900fa2 Mon Sep 17 00:00:00 2001 From: vsavkin Date: Tue, 7 Oct 2014 09:39:52 -0400 Subject: [PATCH] refactor(injector): add @FIELD annotations to Key and Dependency --- modules/di/src/key.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/di/src/key.js b/modules/di/src/key.js index 442a41a118..01fc422f5f 100644 --- a/modules/di/src/key.js +++ b/modules/di/src/key.js @@ -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;