vendor tsgo
This commit is contained in:
25
tools/tsgo/internal/ls/host.go
Normal file
25
tools/tsgo/internal/ls/host.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package ls
|
||||
|
||||
import (
|
||||
"github.com/microsoft/typescript-go/internal/ls/autoimport"
|
||||
"github.com/microsoft/typescript-go/internal/ls/lsconv"
|
||||
"github.com/microsoft/typescript-go/internal/ls/lsutil"
|
||||
"github.com/microsoft/typescript-go/internal/sourcemap"
|
||||
)
|
||||
|
||||
type Host interface {
|
||||
UseCaseSensitiveFileNames() bool
|
||||
ReadFile(path string) (contents string, ok bool)
|
||||
Converters() *lsconv.Converters
|
||||
GetPreferences(activeFile string) lsutil.UserPreferences
|
||||
GetECMALineInfo(fileName string) *sourcemap.ECMALineInfo
|
||||
AutoImportRegistry() *autoimport.Registry
|
||||
|
||||
// Used for module specifier completions.
|
||||
// ! Do not use for anything else, as this violates the principle that
|
||||
// the host is a snapshot-in-time.
|
||||
ReadDirectory(currentDir string, path string, extensions []string, excludes []string, includes []string, depth int) []string
|
||||
GetDirectories(path string) []string
|
||||
DirectoryExists(path string) bool
|
||||
FileExists(path string) bool
|
||||
}
|
||||
Reference in New Issue
Block a user