diff --git a/modules/benchmarks/src/largetable/util.ts b/modules/benchmarks/src/largetable/util.ts index a007224bf1..3c5adfe767 100644 --- a/modules/benchmarks/src/largetable/util.ts +++ b/modules/benchmarks/src/largetable/util.ts @@ -13,8 +13,8 @@ export class TableCell { } let tableCreateCount: number; -export let maxRow: number; -export let maxCol: number; +let maxRow: number; +let maxCol: number; let numberData: TableCell[][]; let charData: TableCell[][]; diff --git a/modules/benchmarks/src/tree/ng2_static/tree.ts b/modules/benchmarks/src/tree/ng2_static/tree.ts index 00d10e74a2..2ca2adaf1d 100644 --- a/modules/benchmarks/src/tree/ng2_static/tree.ts +++ b/modules/benchmarks/src/tree/ng2_static/tree.ts @@ -9,7 +9,7 @@ import {Component, Input, NgModule} from '@angular/core'; import {BrowserModule, DomSanitizer, SafeStyle} from '@angular/platform-browser'; -import {TreeNode, emptyTree, maxDepth} from '../util'; +import {TreeNode, emptyTree, getMaxDepth} from '../util'; let trustedEmptyColor: SafeStyle; let trustedGreyColor: SafeStyle; @@ -40,8 +40,8 @@ export class RootTreeComponent { function createModule(): any { const components: any[] = [RootTreeComponent]; - for (let i = 0; i <= maxDepth; i++) { - components.push(createTreeComponent(i, i === maxDepth)); + for (let i = 0; i <= getMaxDepth(); i++) { + components.push(createTreeComponent(i, i === getMaxDepth())); } @NgModule({imports: [BrowserModule], bootstrap: [RootTreeComponent], declarations: [components]}) diff --git a/modules/benchmarks/src/tree/util.ts b/modules/benchmarks/src/tree/util.ts index 90d475ad05..4c9dc19789 100644 --- a/modules/benchmarks/src/tree/util.ts +++ b/modules/benchmarks/src/tree/util.ts @@ -25,10 +25,14 @@ export class TreeNode { } let treeCreateCount: number; -export let maxDepth: number; +let maxDepth: number; let numberData: TreeNode; let charData: TreeNode; +export function getMaxDepth() { + return maxDepth; +} + init(); function init() { @@ -77,4 +81,4 @@ export function newArray(size: number, value?: T): T[] { list.push(value !); } return list; -} \ No newline at end of file +}