Documentation
¶
Index ¶
- func CountPathComponents(path string) int
- func GetModuleSpecifiers(moduleSymbol *ast.Symbol, checker CheckerShape, ...) []string
- type CheckerShape
- type ImportModuleSpecifierEndingPreference
- type ImportModuleSpecifierPreference
- type Info
- type MatchingMode
- type ModulePath
- type ModuleSpecifierEnding
- type ModuleSpecifierGenerationHost
- type ModuleSpecifierOptions
- type ModuleSpecifierPreferences
- type NodeModulePathParts
- type PackageJsonInfo
- type RelativePreferenceKind
- type ResultKind
- type SourceFileForSpecifierGeneration
- type UserPreferences
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CountPathComponents ¶
func GetModuleSpecifiers ¶
func GetModuleSpecifiers( moduleSymbol *ast.Symbol, checker CheckerShape, compilerOptions *core.CompilerOptions, importingSourceFile SourceFileForSpecifierGeneration, host ModuleSpecifierGenerationHost, userPreferences UserPreferences, options ModuleSpecifierOptions, ) []string
Types ¶
type CheckerShape ¶
type ImportModuleSpecifierEndingPreference ¶
type ImportModuleSpecifierEndingPreference string
const ( ImportModuleSpecifierEndingPreferenceNone ImportModuleSpecifierEndingPreference = "" ImportModuleSpecifierEndingPreferenceAuto ImportModuleSpecifierEndingPreference = "auto" ImportModuleSpecifierEndingPreferenceMinimal ImportModuleSpecifierEndingPreference = "minimal" ImportModuleSpecifierEndingPreferenceIndex ImportModuleSpecifierEndingPreference = "index" ImportModuleSpecifierEndingPreferenceJs ImportModuleSpecifierEndingPreference = "js" )
type ImportModuleSpecifierPreference ¶
type ImportModuleSpecifierPreference string
const ( ImportModuleSpecifierPreferenceNone ImportModuleSpecifierPreference = "" ImportModuleSpecifierPreferenceShortest ImportModuleSpecifierPreference = "shortest" ImportModuleSpecifierPreferenceProjectRelative ImportModuleSpecifierPreference = "project-relative" ImportModuleSpecifierPreferenceRelative ImportModuleSpecifierPreference = "relative" ImportModuleSpecifierPreferenceNonRelative ImportModuleSpecifierPreference = "non-relative" )
type MatchingMode ¶
type MatchingMode uint8
const ( MatchingModeExact MatchingMode = iota MatchingModeDirectory MatchingModePattern )
type ModulePath ¶
type ModuleSpecifierEnding ¶
type ModuleSpecifierEnding uint8
const ( ModuleSpecifierEndingMinimal ModuleSpecifierEnding = iota ModuleSpecifierEndingIndex ModuleSpecifierEndingJsExtension ModuleSpecifierEndingTsExtension )
type ModuleSpecifierGenerationHost ¶
type ModuleSpecifierGenerationHost interface { // GetModuleResolutionCache() any // !!! TODO: adapt new resolution cache model // GetSymlinkCache() any // !!! TODO: adapt new resolution cache model // GetFileIncludeReasons() any // !!! TODO: adapt new resolution cache model CommonSourceDirectory() string GetGlobalTypingsCacheLocation() string UseCaseSensitiveFileNames() bool GetCurrentDirectory() string GetOutputAndProjectReference(path tspath.Path) *tsoptions.OutputDtsAndProjectReference GetRedirectTargets(path tspath.Path) []string FileExists(path string) bool GetNearestAncestorDirectoryWithPackageJson(dirname string) string GetPackageJsonInfo(pkgJsonPath string) PackageJsonInfo GetDefaultResolutionModeForFile(file ast.HasFileName) core.ResolutionMode GetResolvedModuleFromModuleSpecifier(file ast.HasFileName, moduleSpecifier *ast.StringLiteralLike) *module.ResolvedModule GetModeForUsageLocation(file ast.HasFileName, moduleSpecifier *ast.StringLiteralLike) core.ResolutionMode }
type ModuleSpecifierOptions ¶
type ModuleSpecifierOptions struct {
OverrideImportMode core.ResolutionMode
}
type ModuleSpecifierPreferences ¶
type ModuleSpecifierPreferences struct {
// contains filtered or unexported fields
}
type NodeModulePathParts ¶
type PackageJsonInfo ¶
type PackageJsonInfo interface { GetDirectory() string GetContents() *packagejson.PackageJson }
type RelativePreferenceKind ¶
type RelativePreferenceKind uint8
const ( RelativePreferenceRelative RelativePreferenceKind = iota RelativePreferenceNonRelative RelativePreferenceShortest RelativePreferenceExternalNonRelative )
type ResultKind ¶
type ResultKind uint8
const ( ResultKindNone ResultKind = iota ResultKindNodeModules ResultKindPaths ResultKindRedirect ResultKindRelative ResultKindAmbient )
type UserPreferences ¶
type UserPreferences struct { ImportModuleSpecifierPreference ImportModuleSpecifierPreference ImportModuleSpecifierEndingPreference ImportModuleSpecifierEndingPreference AutoImportSpecifierExcludeRegexes []string }
Click to show internal directories.
Click to hide internal directories.