MCPcopy Create free account
hub / github.com/microsoft/typescript-go / getModuleResolver

Function getModuleResolver

internal/ls/autoimport/util.go:317–323  ·  view source on GitHub ↗
(host RegistryCloneHost, realpath func(string) string, opts module.ResolverOptions)

Source from the content-addressed store, hash-verified

315}
316
317func getModuleResolver(host RegistryCloneHost, realpath func(string) string, opts module.ResolverOptions) *module.Resolver {
318 rh := &resolutionHost{
319 fs: wrapvfs.Wrap(host.FS(), wrapvfs.Replacements{Realpath: realpath}),
320 currentDirectory: host.GetCurrentDirectory(),
321 }
322 return module.NewResolverWithOptions(rh, core.EmptyCompilerOptions, "", "", opts)
323}

Callers 1

extractPackageMethod · 0.85

Calls 4

WrapFunction · 0.92
NewResolverWithOptionsFunction · 0.92
FSMethod · 0.65
GetCurrentDirectoryMethod · 0.65

Tested by

no test coverage detected