(scriptInfo: ts.server.ScriptInfo, position: lsp.Position)
| 89 | * @param position |
| 90 | */ |
| 91 | export function lspPositionToTsPosition(scriptInfo: ts.server.ScriptInfo, position: lsp.Position) { |
| 92 | const {line, character} = position; |
| 93 | // ScriptInfo (TS) is 1-based, LSP is 0-based. |
| 94 | return scriptInfo.lineOffsetToPosition(line + 1, character + 1); |
| 95 | } |
| 96 | |
| 97 | /** |
| 98 | * Convert lsp.Range which is made up of `start` and `end` positions to |
no outgoing calls
no test coverage detected