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

Function appendIndexInfo

test/fixtures/snapshot/typescript.js:58351–58362  ·  view source on GitHub ↗
(indexInfos, newInfo, union)

Source from the content-addressed store, hash-verified

58349 return signatures;
58350 }
58351 function appendIndexInfo(indexInfos, newInfo, union) {
58352 if (indexInfos) {
58353 for (var i = 0; i < indexInfos.length; i++) {
58354 var info = indexInfos[i];
58355 if (info.keyType === newInfo.keyType) {
58356 indexInfos[i] = createIndexInfo(info.keyType, union ? getUnionType([info.type, newInfo.type]) : getIntersectionType([info.type, newInfo.type]), union ? info.isReadonly || newInfo.isReadonly : info.isReadonly && newInfo.isReadonly);
58357 return indexInfos;
58358 }
58359 }
58360 }
58361 return ts.append(indexInfos, newInfo);
58362 }
58363 /**
58364 * Converts an AnonymousType to a ResolvedType.
58365 */

Callers 2

_loop_12Function · 0.85

Calls 4

createIndexInfoFunction · 0.85
getUnionTypeFunction · 0.85
getIntersectionTypeFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…