Fix name: mapEntries is more accurate

This commit is contained in:
Andy Hanson
2017-01-06 13:13:45 -08:00
parent 8c5afd7f54
commit 9221336bf1
2 changed files with 2 additions and 2 deletions

View File

@@ -506,7 +506,7 @@ namespace ts {
return result;
}
export function mapValues<T, U>(map: Map<T>, f: (key: string, value: T) => [string, U]): Map<U> {
export function mapEntries<T, U>(map: Map<T>, f: (key: string, value: T) => [string, U]): Map<U> {
if (!map) {
return undefined;
}

View File

@@ -89,7 +89,7 @@ namespace ts {
});
const caseInsensitiveBasePath = "c:/dev/";
const caseInsensitiveHost = new Utils.MockParseConfigHost(caseInsensitiveBasePath, /*useCaseSensitiveFileNames*/ false, mapValues(testContents, (key, content) => [`c:${key}`, content]));
const caseInsensitiveHost = new Utils.MockParseConfigHost(caseInsensitiveBasePath, /*useCaseSensitiveFileNames*/ false, mapEntries(testContents, (key, content) => [`c:${key}`, content]));
const caseSensitiveBasePath = "/dev/";
const caseSensitiveHost = new Utils.MockParseConfigHost(caseSensitiveBasePath, /*useCaseSensitiveFileNames*/ true, testContents);