(generatedFileName, sourceFileName)
| 144550 | return ts.toPath(fileName, currentDirectory, getCanonicalFileName); |
| 144551 | } |
| 144552 | function getDocumentPositionMapper(generatedFileName, sourceFileName) { |
| 144553 | var path = toPath(generatedFileName); |
| 144554 | var value = documentPositionMappers.get(path); |
| 144555 | if (value) |
| 144556 | return value; |
| 144557 | var mapper; |
| 144558 | if (host.getDocumentPositionMapper) { |
| 144559 | mapper = host.getDocumentPositionMapper(generatedFileName, sourceFileName); |
| 144560 | } |
| 144561 | else if (host.readFile) { |
| 144562 | var file = getSourceFileLike(generatedFileName); |
| 144563 | mapper = file && ts.getDocumentPositionMapper({ getSourceFileLike: getSourceFileLike, getCanonicalFileName: getCanonicalFileName, log: function (s) { return host.log(s); } }, generatedFileName, ts.getLineInfo(file.text, ts.getLineStarts(file)), function (f) { return !host.fileExists || host.fileExists(f) ? host.readFile(f) : undefined; }); |
| 144564 | } |
| 144565 | documentPositionMappers.set(path, mapper || ts.identitySourceMapConsumer); |
| 144566 | return mapper || ts.identitySourceMapConsumer; |
| 144567 | } |
| 144568 | function tryGetSourcePosition(info) { |
| 144569 | if (!ts.isDeclarationFileName(info.fileName)) |
| 144570 | return undefined; |
no test coverage detected
searching dependent graphs…