MCPcopy Create free account
hub / github.com/microsoft/typescript-go / createLspPosition

Method createLspPosition

internal/ls/utilities.go:303–305  ·  view source on GitHub ↗
(position int, file *ast.SourceFile)

Source from the content-addressed store, hash-verified

301}
302
303func (l *LanguageService) createLspPosition(position int, file *ast.SourceFile) lsproto.Position {
304 return l.converters.PositionToLineAndCharacter(file, core.TextPos(position))
305}
306
307func quote(file *ast.SourceFile, preferences lsutil.UserPreferences, text string) string {
308 // Editors can pass in undefined or empty string - we want to infer the preference in those cases.

Callers 4

getCompletionDataMethod · 0.95
setItemDefaultsMethod · 0.95
TextDocumentPositionMethod · 0.80

Calls 2

TextPosTypeAlias · 0.92

Tested by

no test coverage detected