typescript

package
v1.507.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfigPaths = TsConfigPaths{
	Rel: ".",
	Map: &map[string][]string{},
}

Functions

This section is empty.

Types

type TsConfig

type TsConfig struct {
	ConfigDir string

	RootDir string
	BaseUrl string

	VirtualRootDirs []string

	Paths *TsConfigPaths
}

func (TsConfig) ExpandPaths

func (c TsConfig) ExpandPaths(from, p string) []string

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 TsConfigPaths struct {
	Rel string
	Map *map[string][]string
}

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) error

func (*TsWorkspace) ExpandPaths

func (tc *TsWorkspace) ExpandPaths(from, f string) []string

func (*TsWorkspace) IsWithinTsRoot

func (tc *TsWorkspace) IsWithinTsRoot(f string) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL