Documentation
¶
Index ¶
- Constants
- func ComparePatternKeys(a, b string) int
- func GetAutomaticTypeDirectiveNames(options *core.CompilerOptions, host ResolutionHost) []string
- func MangleScopedPackageName(packageName string) string
- func ParseNodeModuleFromPath(resolved string, isFolder bool) string
- func ParsePackageName(moduleName string) (packageName, rest string)
- func UnmangleScopedPackageName(packageName string) string
- type LookupLocations
- type ModeAwareCache
- type ModeAwareCacheKey
- type NodeResolutionFeatures
- type PackageId
- type ResolutionHost
- type ResolvedModule
- type ResolvedProjectReference
- type ResolvedTypeReferenceDirective
- type Resolver
- func (r *Resolver) GetLookupLocationsForResolvedModule(resolvedModule *ResolvedModule) *LookupLocations
- func (r *Resolver) GetLookupLocationsForResolvedTypeReferenceDirective(resolvedTypeReferenceDirective *ResolvedTypeReferenceDirective) *LookupLocations
- func (r *Resolver) GetPackageScopeForPath(directory string) *packagejson.InfoCacheEntry
- func (r *Resolver) ResolveModuleName(moduleName string, containingFile string, resolutionMode core.ResolutionMode, ...) *ResolvedModule
- func (r *Resolver) ResolveTypeReferenceDirective(typeReferenceDirectiveName string, containingFile string, ...) *ResolvedTypeReferenceDirective
Constants ¶
View Source
const ( NodeResolutionFeaturesImports NodeResolutionFeatures = 1 << iota NodeResolutionFeaturesSelfName NodeResolutionFeaturesExports NodeResolutionFeaturesExportsPatternTrailers NodeResolutionFeaturesNone NodeResolutionFeatures = 0 NodeResolutionFeaturesAll = NodeResolutionFeaturesImports | NodeResolutionFeaturesSelfName | NodeResolutionFeaturesExports | NodeResolutionFeaturesExportsPatternTrailers NodeResolutionFeaturesNode16Default = NodeResolutionFeaturesImports | NodeResolutionFeaturesSelfName | NodeResolutionFeaturesExports | NodeResolutionFeaturesExportsPatternTrailers NodeResolutionFeaturesNodeNextDefault = NodeResolutionFeaturesAll NodeResolutionFeaturesBundlerDefault = NodeResolutionFeaturesImports | NodeResolutionFeaturesSelfName | NodeResolutionFeaturesExports | NodeResolutionFeaturesExportsPatternTrailers )
View Source
const InferredTypesContainingFile = "__inferred type names__.ts"
Variables ¶
This section is empty.
Functions ¶
func ComparePatternKeys ¶
func GetAutomaticTypeDirectiveNames ¶
func GetAutomaticTypeDirectiveNames(options *core.CompilerOptions, host ResolutionHost) []string
func MangleScopedPackageName ¶
func ParseNodeModuleFromPath ¶
func ParsePackageName ¶
Types ¶
type LookupLocations ¶
type LookupLocations struct { FailedLookupLocations []string AffectingLocations []string ResolutionDiagnostics []ast.Diagnostic }
type ModeAwareCache ¶
type ModeAwareCache[T any] map[ModeAwareCacheKey]T
type ModeAwareCacheKey ¶
type ModeAwareCacheKey struct { Name string Mode core.ResolutionMode }
type NodeResolutionFeatures ¶
type NodeResolutionFeatures int32
type PackageId ¶
func (*PackageId) PackageName ¶
type ResolutionHost ¶
type ResolvedModule ¶
type ResolvedModule struct { ResolvedFileName string OriginalPath string Extension string ResolvedUsingTsExtension bool PackageId PackageId IsExternalLibraryImport bool AlternateResult string }
func ResolveConfig ¶
func ResolveConfig(moduleName string, containingFile string, host ResolutionHost) *ResolvedModule
func (*ResolvedModule) IsResolved ¶
func (r *ResolvedModule) IsResolved() bool
type ResolvedProjectReference ¶
type ResolvedProjectReference struct { CommandLine core.ParsedOptions SourceFile *ast.SourceFile References []*ResolvedProjectReference }
type ResolvedTypeReferenceDirective ¶
type ResolvedTypeReferenceDirective struct { Primary bool ResolvedFileName string OriginalPath string PackageId PackageId IsExternalLibraryImport bool }
func (*ResolvedTypeReferenceDirective) IsResolved ¶
func (r *ResolvedTypeReferenceDirective) IsResolved() bool
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
func NewResolver ¶
func NewResolver( host ResolutionHost, options *core.CompilerOptions, ) *Resolver
func (*Resolver) GetLookupLocationsForResolvedModule ¶
func (r *Resolver) GetLookupLocationsForResolvedModule(resolvedModule *ResolvedModule) *LookupLocations
func (*Resolver) GetLookupLocationsForResolvedTypeReferenceDirective ¶
func (r *Resolver) GetLookupLocationsForResolvedTypeReferenceDirective(resolvedTypeReferenceDirective *ResolvedTypeReferenceDirective) *LookupLocations
func (*Resolver) GetPackageScopeForPath ¶
func (r *Resolver) GetPackageScopeForPath(directory string) *packagejson.InfoCacheEntry
func (*Resolver) ResolveModuleName ¶
func (r *Resolver) ResolveModuleName(moduleName string, containingFile string, resolutionMode core.ResolutionMode, redirectedReference *ResolvedProjectReference) *ResolvedModule
func (*Resolver) ResolveTypeReferenceDirective ¶
func (r *Resolver) ResolveTypeReferenceDirective(typeReferenceDirectiveName string, containingFile string, resolutionMode core.ResolutionMode, redirectedReference *ResolvedProjectReference) *ResolvedTypeReferenceDirective
Click to show internal directories.
Click to hide internal directories.