Documentation
¶
Index ¶
- func DiscoverTypings(fs vfs.FS, logger logging.Logger, typingsInfo *TypingsInfo, fileNames []string, ...) (cachedTypingPaths []string, newTypingNames []string, filesToWatch []string)
- type CachedTyping
- type NameValidationResult
- type NpmExecutor
- type TypingsInfo
- type TypingsInstallRequest
- type TypingsInstallResult
- type TypingsInstaller
- type TypingsInstallerHost
- type TypingsInstallerOptions
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 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)
*
- Validates package name using rules defined at https://docs.npmjs.com/files/package.json *
- @internal
type NpmExecutor ¶
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 TypingsInstaller ¶
type TypingsInstaller struct {
// contains filtered or unexported fields
}
func NewTypingsInstaller ¶
func NewTypingsInstaller(options *TypingsInstallerOptions, host TypingsInstallerHost) *TypingsInstaller
func (*TypingsInstaller) InstallTypings ¶
func (ti *TypingsInstaller) InstallTypings(request *TypingsInstallRequest) (*TypingsInstallResult, error)
type TypingsInstallerHost ¶
type TypingsInstallerHost interface { NpmExecutor module.ResolutionHost }
type TypingsInstallerOptions ¶
Click to show internal directories.
Click to hide internal directories.