refactor(ListWrapper): drop forEach and removeLast

Closes #4584
This commit is contained in:
Victor Berchet
2015-10-07 09:09:43 -07:00
parent 4ed642f921
commit aee176115b
35 changed files with 71 additions and 104 deletions
@@ -126,9 +126,8 @@ export class DebugElement {
var views = view.viewContainers[view.elementOffset + i];
if (isPresent(views)) {
ListWrapper.forEach(views.views, (nextView) => {
els = els.concat(this._getChildElements(nextView, null));
});
views.views.forEach(
(nextView) => { els = els.concat(this._getChildElements(nextView, null)); });
}
}
}
@@ -155,17 +154,15 @@ export class Scope {
var scope = [];
scope.push(debugElement);
ListWrapper.forEach(debugElement.children,
(child) => { scope = scope.concat(Scope.all(child)); });
debugElement.children.forEach(child => scope = scope.concat(Scope.all(child)));
ListWrapper.forEach(debugElement.componentViewChildren,
(child) => { scope = scope.concat(Scope.all(child)); });
debugElement.componentViewChildren.forEach(child => scope = scope.concat(Scope.all(child)));
return scope;
}
static light(debugElement: DebugElement): DebugElement[] {
var scope = [];
ListWrapper.forEach(debugElement.children, (child) => {
debugElement.children.forEach(child => {
scope.push(child);
scope = scope.concat(Scope.light(child));
});
@@ -175,7 +172,7 @@ export class Scope {
static view(debugElement: DebugElement): DebugElement[] {
var scope = [];
ListWrapper.forEach(debugElement.componentViewChildren, (child) => {
debugElement.componentViewChildren.forEach(child => {
scope.push(child);
scope = scope.concat(Scope.light(child));
});