Skip to content

Commit c156c93

Browse files
committed
Add note about comparing source positions
1 parent 2f84741 commit c156c93

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/compiler/sourcemap.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,8 @@ namespace ts {
583583
}
584584

585585
function compareSourcePositions(left: SourceMappedPosition, right: SourceMappedPosition) {
586+
// Compares sourcePosition without comparing sourceIndex
587+
// since the mappings are grouped by sourceIndex
586588
Debug.assert(left.sourceIndex === right.sourceIndex);
587589
return compareValues(left.sourcePosition, right.sourcePosition);
588590
}

0 commit comments

Comments
 (0)