Remove unused function (#22848)

This commit is contained in:
Andy 2018-03-26 08:03:24 -07:00 committed by GitHub
parent 3710218d95
commit fdc468976e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -623,23 +623,6 @@ namespace ts {
};
}
/**
* Computes the first matching span of elements and returns a tuple of the first span
* and the remaining elements.
*/
export function span<T>(array: ReadonlyArray<T>, f: (x: T, i: number) => boolean): [T[], T[]] {
if (array) {
for (let i = 0; i < array.length; i++) {
if (!f(array[i], i)) {
return [array.slice(0, i), array.slice(i)];
}
}
return [array.slice(0), []];
}
return undefined;
}
/**
* Maps contiguous spans of values with the same key.
*