(watch, hostOrHostWithWatch, rootNames, options, baseWatchOptions)
| 124154 | } |
| 124155 | ts.createSolutionBuilderWithWatch = createSolutionBuilderWithWatch; |
| 124156 | function createSolutionBuilderState(watch, hostOrHostWithWatch, rootNames, options, baseWatchOptions) { |
| 124157 | var host = hostOrHostWithWatch; |
| 124158 | var hostWithWatch = hostOrHostWithWatch; |
| 124159 | var currentDirectory = host.getCurrentDirectory(); |
| 124160 | var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames()); |
| 124161 | // State of the solution |
| 124162 | var baseCompilerOptions = getCompilerOptionsOfBuildOptions(options); |
| 124163 | var compilerHost = ts.createCompilerHostFromProgramHost(host, function () { return state.projectCompilerOptions; }); |
| 124164 | ts.setGetSourceFileAsHashVersioned(compilerHost, host); |
| 124165 | compilerHost.getParsedCommandLine = function (fileName) { return parseConfigFile(state, fileName, toResolvedConfigFilePath(state, fileName)); }; |
| 124166 | compilerHost.resolveModuleNames = ts.maybeBind(host, host.resolveModuleNames); |
| 124167 | compilerHost.resolveTypeReferenceDirectives = ts.maybeBind(host, host.resolveTypeReferenceDirectives); |
| 124168 | var moduleResolutionCache = !compilerHost.resolveModuleNames ? ts.createModuleResolutionCache(currentDirectory, getCanonicalFileName) : undefined; |
| 124169 | var typeReferenceDirectiveResolutionCache = !compilerHost.resolveTypeReferenceDirectives ? ts.createTypeReferenceDirectiveResolutionCache(currentDirectory, getCanonicalFileName, /*options*/ undefined, moduleResolutionCache === null || moduleResolutionCache === void 0 ? void 0 : moduleResolutionCache.getPackageJsonInfoCache()) : undefined; |
| 124170 | if (!compilerHost.resolveModuleNames) { |
| 124171 | var loader_3 = function (moduleName, resolverMode, containingFile, redirectedReference) { return ts.resolveModuleName(moduleName, containingFile, state.projectCompilerOptions, compilerHost, moduleResolutionCache, redirectedReference, resolverMode).resolvedModule; }; |
| 124172 | compilerHost.resolveModuleNames = function (moduleNames, containingFile, _reusedNames, redirectedReference, _options, containingSourceFile) { |
| 124173 | return ts.loadWithModeAwareCache(ts.Debug.checkEachDefined(moduleNames), ts.Debug.checkDefined(containingSourceFile), containingFile, redirectedReference, loader_3); |
| 124174 | }; |
| 124175 | compilerHost.getModuleResolutionCache = function () { return moduleResolutionCache; }; |
| 124176 | } |
| 124177 | if (!compilerHost.resolveTypeReferenceDirectives) { |
| 124178 | var loader_4 = function (moduleName, containingFile, redirectedReference, containingFileMode) { return ts.resolveTypeReferenceDirective(moduleName, containingFile, state.projectCompilerOptions, compilerHost, redirectedReference, state.typeReferenceDirectiveResolutionCache, containingFileMode).resolvedTypeReferenceDirective; }; |
| 124179 | compilerHost.resolveTypeReferenceDirectives = function (typeReferenceDirectiveNames, containingFile, redirectedReference, _options, containingFileMode) { |
| 124180 | return ts.loadWithTypeDirectiveCache(ts.Debug.checkEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, containingFileMode, loader_4); |
| 124181 | }; |
| 124182 | } |
| 124183 | var _a = ts.createWatchFactory(hostWithWatch, options), watchFile = _a.watchFile, watchDirectory = _a.watchDirectory, writeLog = _a.writeLog; |
| 124184 | var state = { |
| 124185 | host: host, |
| 124186 | hostWithWatch: hostWithWatch, |
| 124187 | currentDirectory: currentDirectory, |
| 124188 | getCanonicalFileName: getCanonicalFileName, |
| 124189 | parseConfigFileHost: ts.parseConfigHostFromCompilerHostLike(host), |
| 124190 | write: ts.maybeBind(host, host.trace), |
| 124191 | // State of solution |
| 124192 | options: options, |
| 124193 | baseCompilerOptions: baseCompilerOptions, |
| 124194 | rootNames: rootNames, |
| 124195 | baseWatchOptions: baseWatchOptions, |
| 124196 | resolvedConfigFilePaths: new ts.Map(), |
| 124197 | configFileCache: new ts.Map(), |
| 124198 | projectStatus: new ts.Map(), |
| 124199 | buildInfoChecked: new ts.Map(), |
| 124200 | extendedConfigCache: new ts.Map(), |
| 124201 | builderPrograms: new ts.Map(), |
| 124202 | diagnostics: new ts.Map(), |
| 124203 | projectPendingBuild: new ts.Map(), |
| 124204 | projectErrorsReported: new ts.Map(), |
| 124205 | compilerHost: compilerHost, |
| 124206 | moduleResolutionCache: moduleResolutionCache, |
| 124207 | typeReferenceDirectiveResolutionCache: typeReferenceDirectiveResolutionCache, |
| 124208 | // Mutable state |
| 124209 | buildOrder: undefined, |
| 124210 | readFileWithCache: function (f) { return host.readFile(f); }, |
| 124211 | projectCompilerOptions: baseCompilerOptions, |
| 124212 | cache: undefined, |
| 124213 | allProjectBuildPending: true, |
no test coverage detected
searching dependent graphs…