ata

package
v0.0.0-...-09edcb8 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscoverTypings

func DiscoverTypings(
	fs vfs.FS,
	logger logging.Logger,
	typingsInfo *TypingsInfo,
	fileNames []string,
	projectRootPath string,
	packageNameToTypingLocation *collections.SyncMap[string, *CachedTyping],
	typesRegistry map[string]map[string]string,
) (cachedTypingPaths []string, newTypingNames []string, filesToWatch []string)

Types

type CachedTyping

type CachedTyping struct {
	TypingsLocation string
	Version         *semver.Version
}

type NameValidationResult

type NameValidationResult int
const (
	NameOk NameValidationResult = iota
	EmptyName
	NameTooLong
	NameStartsWithDot
	NameStartsWithUnderscore
	NameContainsNonURISafeCharacters
)

func ValidatePackageName

func ValidatePackageName(packageName string) (result NameValidationResult, name string, isScopeName bool)

*

type NpmExecutor

type NpmExecutor interface {
	NpmInstall(cwd string, args []string) ([]byte, error)
}

type TypingsInfo

type TypingsInfo struct {
	TypeAcquisition   *core.TypeAcquisition
	CompilerOptions   *core.CompilerOptions
	UnresolvedImports *collections.Set[string]
}

func (TypingsInfo) Equals

func (ti TypingsInfo) Equals(other TypingsInfo) bool

type TypingsInstallRequest

type TypingsInstallRequest struct {
	ProjectID        tspath.Path
	TypingsInfo      *TypingsInfo
	FileNames        []string
	ProjectRootPath  string
	CompilerOptions  *core.CompilerOptions
	CurrentDirectory string
	GetScriptKind    func(string) core.ScriptKind
	FS               vfs.FS
	Logger           logging.Logger
}

type TypingsInstallResult

type TypingsInstallResult struct {
	TypingsFiles []string
	FilesToWatch []string
}

type TypingsInstaller

type TypingsInstaller struct {
	// contains filtered or unexported fields
}

func (*TypingsInstaller) InstallTypings

func (ti *TypingsInstaller) InstallTypings(request *TypingsInstallRequest) (*TypingsInstallResult, error)

func (*TypingsInstaller) IsKnownTypesPackageName

func (ti *TypingsInstaller) IsKnownTypesPackageName(projectID tspath.Path, name string, fs vfs.FS, logger logging.Logger) bool

type TypingsInstallerHost

type TypingsInstallerHost interface {
	NpmExecutor
	module.ResolutionHost
}

type TypingsInstallerOptions

type TypingsInstallerOptions struct {
	TypingsLocation string
	ThrottleLimit   int
}

Jump to

Keyboard shortcuts

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