( host ResolutionHost, compilerOptions *core.CompilerOptions, typingsLocation string, projectName string, opts ResolverOptions, )
| 181 | } |
| 182 | |
| 183 | func 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 | |
| 204 | func (r *Resolver) newTraceBuilder() *tracer { |
| 205 | if r.compilerOptions.TraceResolution == core.TSTrue { |
no test coverage detected