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

Function convertDocumentToSourceMapper

test/fixtures/snapshot/typescript.js:144671–144681  ·  view source on GitHub ↗
(host, contents, mapFileName)

Source from the content-addressed store, hash-verified

144669 }
144670 ts.getDocumentPositionMapper = getDocumentPositionMapper;
144671 function convertDocumentToSourceMapper(host, contents, mapFileName) {
144672 var map = ts.tryParseRawSourceMap(contents);
144673 if (!map || !map.sources || !map.file || !map.mappings) {
144674 // obviously invalid map
144675 return undefined;
144676 }
144677 // Dont support sourcemaps that contain inlined sources
144678 if (map.sourcesContent && map.sourcesContent.some(ts.isString))
144679 return undefined;
144680 return ts.createDocumentPositionMapper(host, map, mapFileName);
144681 }
144682 function createSourceFileLike(text, lineMap) {
144683 return {
144684 text: text,

Callers 1

Calls 1

someMethod · 0.80

Tested by

no test coverage detected