mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 07:13:45 -05:00
Add assertion to computePositionOfLineAndCharacter (#17121)
This commit is contained in:
@@ -86,7 +86,7 @@ namespace ts.server {
|
||||
*/
|
||||
lineOffsetToPosition(line: number, offset: number): number {
|
||||
if (!this.svc) {
|
||||
return computePositionOfLineAndCharacter(this.getLineMap(), line - 1, offset - 1);
|
||||
return computePositionOfLineAndCharacter(this.getLineMap(), line - 1, offset - 1, this.text);
|
||||
}
|
||||
|
||||
// TODO: assert this offset is actually on the line
|
||||
|
||||
Reference in New Issue
Block a user