Versions in this module Expand all Collapse all v0 v0.0.2 Apr 25, 2026 Changes in this version + func UpdateModuleSpecifier(compilerOptions *core.CompilerOptions, host ModuleSpecifierGenerationHost, ...) string v0.0.1 Apr 11, 2026 Changes in this version + func ContainsNodeModules(s string) bool + func CountPathComponents(path string) int + func GetJSExtensionForDeclarationFileExtension(ext string) string + func GetModuleSpecifier(compilerOptions *core.CompilerOptions, host ModuleSpecifierGenerationHost, ...) string + func GetModuleSpecifiers(moduleSymbol *ast.Symbol, checker CheckerShape, ...) []string + func GetNodeModulesPackageName(compilerOptions *core.CompilerOptions, importingSourceFile *ast.SourceFile, ...) string + func GetPackageNameFromDirectory(fileOrDirectoryPath string) string + func IsExcludedByRegex(moduleSpecifier string, excludes []string) bool + func PathIsBareSpecifier(path string) bool + func ProcessEntrypointEnding(entrypoint *module.ResolvedEntrypoint, prefs UserPreferences, ...) string + func TryGetRealFileNameForNonJSDeclarationFileName(fileName string) string + type CheckerShape interface + GetAliasedSymbol func(symbol *ast.Symbol) *ast.Symbol + GetSymbolAtLocation func(node *ast.Node) *ast.Symbol + type ImportModuleSpecifierEndingPreference string + const ImportModuleSpecifierEndingPreferenceAuto + const ImportModuleSpecifierEndingPreferenceIndex + const ImportModuleSpecifierEndingPreferenceJs + const ImportModuleSpecifierEndingPreferenceMinimal + const ImportModuleSpecifierEndingPreferenceNone + type ImportModuleSpecifierPreference string + const ImportModuleSpecifierPreferenceNonRelative + const ImportModuleSpecifierPreferenceNone + const ImportModuleSpecifierPreferenceProjectRelative + const ImportModuleSpecifierPreferenceRelative + const ImportModuleSpecifierPreferenceShortest + type Info struct + ImportingSourceFileName string + SourceDirectory string + UseCaseSensitiveFileNames bool + type MatchingMode uint8 + const MatchingModeDirectory + const MatchingModeExact + const MatchingModePattern + type ModulePath struct + FileName string + IsInNodeModules bool + IsRedirect bool + func GetEachFileNameOfModule(importingFileName string, importedFileName string, ...) []ModulePath + type ModuleSpecifierEnding uint8 + const ModuleSpecifierEndingIndex + const ModuleSpecifierEndingJsExtension + const ModuleSpecifierEndingMinimal + const ModuleSpecifierEndingTsExtension + func GetAllowedEndingsInPreferredOrder(prefs UserPreferences, host ModuleSpecifierGenerationHost, ...) []ModuleSpecifierEnding + type ModuleSpecifierGenerationHost interface + CommonSourceDirectory func() string + FileExists func(path string) bool + GetCurrentDirectory func() string + GetDefaultResolutionModeForFile func(file ast.HasFileName) core.ResolutionMode + GetGlobalTypingsCacheLocation func() string + GetModeForUsageLocation func(file ast.HasFileName, moduleSpecifier *ast.StringLiteralLike) core.ResolutionMode + GetNearestAncestorDirectoryWithPackageJson func(dirname string) string + GetPackageJsonInfo func(pkgJsonPath string) *packagejson.InfoCacheEntry + GetProjectReferenceFromSource func(path tspath.Path) *tsoptions.SourceOutputAndProjectReference + GetRedirectTargets func(path tspath.Path) []string + GetResolvedModuleFromModuleSpecifier func(file ast.HasFileName, moduleSpecifier *ast.StringLiteralLike) *module.ResolvedModule + GetSourceOfProjectReferenceIfOutputIncluded func(file ast.HasFileName) string + GetSymlinkCache func() *symlinks.KnownSymlinks + UseCaseSensitiveFileNames func() bool + type ModuleSpecifierOptions struct + OverrideImportMode core.ResolutionMode + type ModuleSpecifierPreferences struct + type NodeModulePathParts struct + FileNameIndex int + PackageRootIndex int + TopLevelNodeModulesIndex int + TopLevelPackageNameIndex int + func GetNodeModulePathParts(fullPath string) *NodeModulePathParts + type RelativePreferenceKind uint8 + const RelativePreferenceExternalNonRelative + const RelativePreferenceNonRelative + const RelativePreferenceRelative + const RelativePreferenceShortest + type ResultKind uint8 + const ResultKindAmbient + const ResultKindNodeModules + const ResultKindNone + const ResultKindPaths + const ResultKindRedirect + const ResultKindRelative + func GetModuleSpecifiersForFileWithInfo(importingSourceFile SourceFileForSpecifierGeneration, moduleFileName string, ...) ([]string, ResultKind) + func GetModuleSpecifiersWithInfo(moduleSymbol *ast.Symbol, checker CheckerShape, ...) ([]string, ResultKind) + type SourceFileForSpecifierGeneration interface + FileName func() string + Imports func() []*ast.StringLiteralLike + IsJS func() bool + Path func() tspath.Path + type UserPreferences struct + AutoImportSpecifierExcludeRegexes []string + ImportModuleSpecifierEnding ImportModuleSpecifierEndingPreference + ImportModuleSpecifierPreference ImportModuleSpecifierPreference