Skip to content

Commit 24753c4

Browse files
author
Arthur Ozga
committed
remove asserts
1 parent 5c8e351 commit 24753c4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/compiler/scanner.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,10 @@ namespace ts {
319319
}
320320

321321
/* @internal */
322+
/**
323+
* We assume the first line starts at position 0 and 'position' is non-negative.
324+
*/
322325
export function computeLineAndCharacterOfPosition(lineStarts: number[], position: number) {
323-
Debug.assert(lineStarts.length && lineStarts[0] === 0, "the first line should start at position 0");
324-
Debug.assert(0 <= position, "position should be positive");
325-
326326
let lineNumber = binarySearch(lineStarts, position);
327327
if (lineNumber < 0) {
328328
// If the actual position was not found,

0 commit comments

Comments
 (0)