refactor: Move away from index signature based "updateCache". (#30518)

We're deprecating the index signature overloads in favor of using a Map.

PR Close #30518
This commit is contained in:
Bowen Ni 2019-05-16 12:11:11 -07:00 committed by Misko Hevery
parent 55a14e4866
commit 4ecff42e7f
1 changed files with 2 additions and 2 deletions

View File

@ -165,11 +165,11 @@ export function compile({allDepsCompiledWithBazel = true, compilerOpts, tsHost,
if (inputs) {
fileLoader = new CachedFileLoader(fileCache);
// Resolve the inputs to absolute paths to match TypeScript internals
const resolvedInputs: {[path: string]: string} = {};
const resolvedInputs = new Map<string, string>();
const inputKeys = Object.keys(inputs);
for (let i = 0; i < inputKeys.length; i++) {
const key = inputKeys[i];
resolvedInputs[resolveNormalizedPath(key)] = inputs[key];
resolvedInputs.set(resolveNormalizedPath(key), inputs[key]);
}
fileCache.updateCache(resolvedInputs);
} else {