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

Function getSourceMappings

test/fixtures/snapshot/typescript.js:90566–90581  ·  view source on GitHub ↗
(sourceIndex)

Source from the content-addressed store, hash-verified

90564 return decodedMappings;
90565 }
90566 function getSourceMappings(sourceIndex) {
90567 if (sourceMappings === undefined) {
90568 var lists = [];
90569 for (var _i = 0, _a = getDecodedMappings(); _i < _a.length; _i++) {
90570 var mapping = _a[_i];
90571 if (!isSourceMappedPosition(mapping))
90572 continue;
90573 var list = lists[mapping.sourceIndex];
90574 if (!list)
90575 lists[mapping.sourceIndex] = list = [];
90576 list.push(mapping);
90577 }
90578 sourceMappings = lists.map(function (list) { return ts.sortAndDeduplicate(list, compareSourcePositions, sameMappedPosition); });
90579 }
90580 return sourceMappings[sourceIndex];
90581 }
90582 function getGeneratedMappings() {
90583 if (generatedMappings === undefined) {
90584 var list = [];

Callers 1

getGeneratedPositionFunction · 0.85

Calls 4

getDecodedMappingsFunction · 0.85
isSourceMappedPositionFunction · 0.85
mapMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected