Documentation
¶
Index ¶
- type Host
- type LanguageService
- func (l *LanguageService) DefaultLibraryPath() string
- func (l *LanguageService) FS() vfs.FS
- func (l *LanguageService) GetCurrentDirectory() string
- func (l *LanguageService) GetDocumentDiagnostics(fileName string) []*ast.Diagnostic
- func (l *LanguageService) GetProgram() *compiler.Program
- func (l *LanguageService) GetSourceFile(fileName string, path tspath.Path, languageVersion core.ScriptTarget) *ast.SourceFile
- func (l *LanguageService) NewLine() string
- func (l *LanguageService) ProvideDefinitions(fileName string, position int) []Location
- func (l *LanguageService) ProvideHover(fileName string, position int) string
- func (l *LanguageService) Trace(msg string)
- type Location
- type TextChange
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Host ¶
type Host interface { FS() vfs.FS DefaultLibraryPath() string GetCurrentDirectory() string NewLine() string Trace(msg string) GetProjectVersion() int // GetRootFileNames was called GetScriptFileNames in the original code. GetRootFileNames() []string // GetCompilerOptions was called GetCompilationSettings in the original code. GetCompilerOptions() *core.CompilerOptions GetSourceFile(fileName string, path tspath.Path, languageVersion core.ScriptTarget) *ast.SourceFile // This responsibility was moved from the language service to the project, // because they were bidirectionally interdependent. GetProgram() *compiler.Program GetDefaultLibraryPath() string }
type LanguageService ¶
type LanguageService struct {
// contains filtered or unexported fields
}
func NewLanguageService ¶
func NewLanguageService(host Host) *LanguageService
func (*LanguageService) DefaultLibraryPath ¶
func (l *LanguageService) DefaultLibraryPath() string
DefaultLibraryPath implements compiler.CompilerHost.
func (*LanguageService) FS ¶
func (l *LanguageService) FS() vfs.FS
FS implements compiler.CompilerHost.
func (*LanguageService) GetCurrentDirectory ¶
func (l *LanguageService) GetCurrentDirectory() string
GetCurrentDirectory implements compiler.CompilerHost.
func (*LanguageService) GetDocumentDiagnostics ¶
func (l *LanguageService) GetDocumentDiagnostics(fileName string) []*ast.Diagnostic
func (*LanguageService) GetProgram ¶
func (l *LanguageService) GetProgram() *compiler.Program
GetProgram updates the program if the project version has changed.
func (*LanguageService) GetSourceFile ¶
func (l *LanguageService) GetSourceFile(fileName string, path tspath.Path, languageVersion core.ScriptTarget) *ast.SourceFile
GetSourceFile implements compiler.CompilerHost.
func (*LanguageService) NewLine ¶
func (l *LanguageService) NewLine() string
NewLine implements compiler.CompilerHost.
func (*LanguageService) ProvideDefinitions ¶
func (l *LanguageService) ProvideDefinitions(fileName string, position int) []Location
func (*LanguageService) ProvideHover ¶
func (l *LanguageService) ProvideHover(fileName string, position int) string
func (*LanguageService) Trace ¶
func (l *LanguageService) Trace(msg string)
Trace implements compiler.CompilerHost.
type TextChange ¶
func (TextChange) ApplyTo ¶
func (t TextChange) ApplyTo(text string) string
Click to show internal directories.
Click to hide internal directories.