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

Function NewResolverWithOptions

internal/module/resolver.go:183–202  ·  view source on GitHub ↗
(
	host ResolutionHost,
	compilerOptions *core.CompilerOptions,
	typingsLocation string,
	projectName string,
	opts ResolverOptions,
)

Source from the content-addressed store, hash-verified

181}
182
183func NewResolverWithOptions(
184 host ResolutionHost,
185 compilerOptions *core.CompilerOptions,
186 typingsLocation string,
187 projectName string,
188 opts ResolverOptions,
189) *Resolver {
190 r := &Resolver{
191 host: host,
192 compilerOptions: compilerOptions,
193 typingsLocation: typingsLocation,
194 projectName: projectName,
195 }
196 if opts.PackageJsonCache != nil {
197 r.packageJsonInfoCache = opts.PackageJsonCache
198 } else {
199 r.caches = newCaches(host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames(), compilerOptions)
200 }
201 return r
202}
203
204func (r *Resolver) newTraceBuilder() *tracer {
205 if r.compilerOptions.TraceResolution == core.TSTrue {

Callers 3

getModuleResolverFunction · 0.92
updateIndexesMethod · 0.92
buildProjectBucketMethod · 0.92

Calls 4

newCachesFunction · 0.85
GetCurrentDirectoryMethod · 0.65
FSMethod · 0.65

Tested by

no test coverage detected