MCPcopy Index your code
hub / github.com/nodejs/node / zipToModeAwareCache

Function zipToModeAwareCache

test/fixtures/snapshot/typescript.js:42905–42916  ·  view source on GitHub ↗
(file, keys, values)

Source from the content-addressed store, hash-verified

42903 ts.createModeAwareCache = createModeAwareCache;
42904 /* @internal */
42905 function zipToModeAwareCache(file, keys, values) {
42906 ts.Debug.assert(keys.length === values.length);
42907 var map = createModeAwareCache();
42908 for (var i = 0; i < keys.length; ++i) {
42909 var entry = keys[i];
42910 // We lower-case all type references because npm automatically lowercases all packages. See GH#9824.
42911 var name = !ts.isString(entry) ? entry.fileName.toLowerCase() : entry;
42912 var mode = !ts.isString(entry) ? entry.resolutionMode || file.impliedNodeFormat : ts.getModeForResolutionAtIndex(file, i);
42913 map.set(name, mode, values[i]);
42914 }
42915 return map;
42916 }
42917 ts.zipToModeAwareCache = zipToModeAwareCache;
42918 function createModuleResolutionCache(currentDirectory, getCanonicalFileName, options, directoryToModuleNameMap, moduleNameToDirectoryMap) {
42919 var preDirectoryResolutionCache = createPerDirectoryResolutionCache(currentDirectory, getCanonicalFileName, directoryToModuleNameMap || (directoryToModuleNameMap = createCacheWithRedirects(options)));

Callers

nothing calls this directly

Calls 3

createModeAwareCacheFunction · 0.85
assertMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected