Merge pull request #9220 from Microsoft/navbar_refactor_3000

Refactor navigation bar
This commit is contained in:
Andy
2016-06-20 13:16:40 -07:00
committed by GitHub
26 changed files with 1412 additions and 1049 deletions
+11
View File
@@ -138,6 +138,17 @@ namespace ts {
return result;
}
export function filterMutate<T>(array: T[], f: (x: T) => boolean): void {
let outIndex = 0;
for (const item of array) {
if (f(item)) {
array[outIndex] = item;
outIndex++;
}
}
array.length = outIndex;
}
export function map<T, U>(array: T[], f: (x: T) => U): U[] {
let result: U[];
if (array) {