mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
rename arrayFromMap -> convertToArray
This commit is contained in:
@@ -1725,7 +1725,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
function createTypeofType() {
|
||||
return getUnionType(arrayFromMap(typeofEQFacts.keys(), s => getLiteralTypeForText(TypeFlags.StringLiteral, s)));
|
||||
return getUnionType(convertToArray(typeofEQFacts.keys(), s => getLiteralTypeForText(TypeFlags.StringLiteral, s)));
|
||||
}
|
||||
|
||||
// A reserved member name starts with two underscores, but the third character cannot be an underscore
|
||||
|
||||
@@ -895,7 +895,7 @@ namespace ts {
|
||||
return result;
|
||||
}
|
||||
|
||||
export function arrayFromMap<T, U>(iterator: Iterator<T>, f: (value: T) => U) {
|
||||
export function convertToArray<T, U>(iterator: Iterator<T>, f: (value: T) => U) {
|
||||
const result: U[] = [];
|
||||
for (let { value, done } = iterator.next(); !done; { value, done } = iterator.next()) {
|
||||
result.push(f(value));
|
||||
|
||||
Reference in New Issue
Block a user