Documentation ¶
Index ¶
- Variables
- type TsConfig
- type TsConfigMap
- type TsConfigPaths
- type TsWorkspace
- func (tc *TsWorkspace) AddTsConfigFile(root, rel, fileName string)
- func (tc *TsWorkspace) ExpandPaths(from, f string) []string
- func (tc *TsWorkspace) GetTsConfigFile(rel string) *TsConfig
- func (tc *TsWorkspace) IsWithinTsRoot(f string) bool
- func (tc *TsWorkspace) ResolveConfig(dir string) (string, *TsConfig)
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfigPaths = TsConfigPaths{ Rel: ".", Map: &map[string][]string{}, }
View Source
var InvalidTsconfig = TsConfig{ Paths: &DefaultConfigPaths, }
Functions ¶
This section is empty.
Types ¶
type TsConfig ¶
type TsConfig struct { // Directory of the tsconfig file ConfigDir string // Name of the tsconfig file relative to ConfigDir ConfigName string RootDir string BaseUrl string VirtualRootDirs []string Paths *TsConfigPaths // References to other tsconfig or packages that must be resolved. Types []string Extends string // TODO: drop references? Not supported by rules_ts? References []string }
func (TsConfig) ExpandPaths ¶
Expand the given path to all possible mapped paths for this config, in priority order.
Path matching algorithm based on ESBuild implementation Inspired by: https://github.com/evanw/esbuild/blob/deb93e92267a96575a6e434ff18421f4ef0605e4/internal/resolver/resolver.go#L1831-L1945
type TsConfigMap ¶
type TsConfigMap struct {
// contains filtered or unexported fields
}
type TsConfigPaths ¶
type TsWorkspace ¶
type TsWorkspace struct {
// contains filtered or unexported fields
}
func NewTsWorkspace ¶
func NewTsWorkspace() *TsWorkspace
func (*TsWorkspace) AddTsConfigFile ¶
func (tc *TsWorkspace) AddTsConfigFile(root, rel, fileName string)
func (*TsWorkspace) ExpandPaths ¶
func (tc *TsWorkspace) ExpandPaths(from, f string) []string
func (*TsWorkspace) GetTsConfigFile ¶ added in v1.508.0
func (tc *TsWorkspace) GetTsConfigFile(rel string) *TsConfig
func (*TsWorkspace) IsWithinTsRoot ¶
func (tc *TsWorkspace) IsWithinTsRoot(f string) bool
func (*TsWorkspace) ResolveConfig ¶ added in v1.509.12
func (tc *TsWorkspace) ResolveConfig(dir string) (string, *TsConfig)
Click to show internal directories.
Click to hide internal directories.