refactor(MapWrapper): drop delete(), get(), forEach() and size

Closes #4618
This commit is contained in:
Victor Berchet
2015-10-08 16:01:18 -07:00
parent aab0c57aee
commit a8c34ae290
22 changed files with 51 additions and 73 deletions

View File

@ -336,8 +336,8 @@ export class AppProtoView {
this.variableLocations = variableLocations;
this.protoLocals = new Map<string, any>();
if (isPresent(this.templateVariableBindings)) {
MapWrapper.forEach(this.templateVariableBindings,
(templateName, _) => { this.protoLocals.set(templateName, null); });
this.templateVariableBindings.forEach(
(templateName, _) => { this.protoLocals.set(templateName, null); });
}
if (isPresent(variableLocations)) {
// The view's locals needs to have a full set of variable names at construction time
@ -345,8 +345,7 @@ export class AppProtoView {
// want
// to actually create variable bindings for the $implicit bindings, add to the
// protoLocals manually.
MapWrapper.forEach(variableLocations,
(_, templateName) => { this.protoLocals.set(templateName, null); });
variableLocations.forEach((_, templateName) => { this.protoLocals.set(templateName, null); });
}
}

View File

@ -216,7 +216,7 @@ export class AppViewManagerUtils {
_populateViewLocals(view: viewModule.AppView, elementInjector: eli.ElementInjector,
boundElementIdx: number): void {
if (isPresent(elementInjector.getDirectiveVariableBindings())) {
MapWrapper.forEach(elementInjector.getDirectiveVariableBindings(), (directiveIndex, name) => {
elementInjector.getDirectiveVariableBindings().forEach((directiveIndex, name) => {
if (isBlank(directiveIndex)) {
view.locals.set(name, view.elementRefs[boundElementIdx].nativeElement);
} else {