(loc)
| 90609 | return { fileName: generatedAbsoluteFilePath, pos: mapping.generatedPosition }; // Closest pos |
| 90610 | } |
| 90611 | function getSourcePosition(loc) { |
| 90612 | var generatedMappings = getGeneratedMappings(); |
| 90613 | if (!ts.some(generatedMappings)) |
| 90614 | return loc; |
| 90615 | var targetIndex = ts.binarySearchKey(generatedMappings, loc.pos, getGeneratedPositionOfMapping, ts.compareValues); |
| 90616 | if (targetIndex < 0) { |
| 90617 | // if no exact match, closest is 2's complement of result |
| 90618 | targetIndex = ~targetIndex; |
| 90619 | } |
| 90620 | var mapping = generatedMappings[targetIndex]; |
| 90621 | if (mapping === undefined || !isSourceMappedPosition(mapping)) { |
| 90622 | return loc; |
| 90623 | } |
| 90624 | return { fileName: sourceFileAbsolutePaths[mapping.sourceIndex], pos: mapping.sourcePosition }; // Closest pos |
| 90625 | } |
| 90626 | } |
| 90627 | ts.createDocumentPositionMapper = createDocumentPositionMapper; |
| 90628 | ts.identitySourceMapConsumer = { |
nothing calls this directly
no test coverage detected