MCPcopy Index your code
hub / github.com/microsoft/typescript-go / getPackageScopeForPath

Method getPackageScopeForPath

internal/module/resolver.go:497–509  ·  view source on GitHub ↗
(directory string)

Source from the content-addressed store, hash-verified

495}
496
497func (r *resolutionState) getPackageScopeForPath(directory string) *packagejson.InfoCacheEntry {
498 result := tspath.ForEachAncestorDirectoryStoppingAtGlobalCache(
499 r.resolver.typingsLocation,
500 directory,
501 func(directory string) (*packagejson.InfoCacheEntry, bool) {
502 if result := r.getPackageJsonInfo(directory); result != nil {
503 return result, true
504 }
505 return nil, false
506 },
507 )
508 return result
509}
510
511func (r *resolutionState) resolveNodeLike() *ResolvedModule {
512 if r.tracer != nil {

Callers 3

loadModuleFromImportsMethod · 0.95

Tested by

no test coverage detected