(loc)
| 90591 | return generatedMappings; |
| 90592 | } |
| 90593 | function getGeneratedPosition(loc) { |
| 90594 | var sourceIndex = sourceToSourceIndexMap.get(host.getCanonicalFileName(loc.fileName)); |
| 90595 | if (sourceIndex === undefined) |
| 90596 | return loc; |
| 90597 | var sourceMappings = getSourceMappings(sourceIndex); |
| 90598 | if (!ts.some(sourceMappings)) |
| 90599 | return loc; |
| 90600 | var targetIndex = ts.binarySearchKey(sourceMappings, loc.pos, getSourcePositionOfMapping, ts.compareValues); |
| 90601 | if (targetIndex < 0) { |
| 90602 | // if no exact match, closest is 2's complement of result |
| 90603 | targetIndex = ~targetIndex; |
| 90604 | } |
| 90605 | var mapping = sourceMappings[targetIndex]; |
| 90606 | if (mapping === undefined || mapping.sourceIndex !== sourceIndex) { |
| 90607 | return loc; |
| 90608 | } |
| 90609 | return { fileName: generatedAbsoluteFilePath, pos: mapping.generatedPosition }; // Closest pos |
| 90610 | } |
| 90611 | function getSourcePosition(loc) { |
| 90612 | var generatedMappings = getGeneratedMappings(); |
| 90613 | if (!ts.some(generatedMappings)) |
nothing calls this directly
no test coverage detected