refactor(injector): change reflector to collect the resolving path only when an error occurs

This commit is contained in:
vsavkin
2014-10-03 17:26:49 -04:00
parent 15305b6cd7
commit f63a5dd158
6 changed files with 74 additions and 47 deletions

View File

@ -24,9 +24,15 @@ class ListWrapper {
static forEach(list, fn) {
list.forEach(fn);
}
static last(list) {
static first(List list) {
return list.first;
}
static last(List list) {
return list.last;
}
static reversed(List list) {
return list.reversed;
}
static void push(List l, e) { l.add(e); }
}

View File

@ -34,10 +34,18 @@ export class ListWrapper {
static push(array, el) {
array.push(el);
}
static first(array) {
if (!array) return null;
return array[0];
}
static last(array) {
if (!array || array.length == 0) return null;
return array[array.length - 1];
}
static reversed(array) {
var a = ListWrapper.clone(array);
return a.reverse();
}
}
export class SetWrapper {