@internal
(configParseResult, configFileName, host)
| 41153 | */ |
| 41154 | /** @internal */ |
| 41155 | function convertToTSConfig(configParseResult, configFileName, host) { |
| 41156 | var _a, _b, _c; |
| 41157 | var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames); |
| 41158 | var files = ts.map(ts.filter(configParseResult.fileNames, !((_b = (_a = configParseResult.options.configFile) === null || _a === void 0 ? void 0 : _a.configFileSpecs) === null || _b === void 0 ? void 0 : _b.validatedIncludeSpecs) ? ts.returnTrue : matchesSpecs(configFileName, configParseResult.options.configFile.configFileSpecs.validatedIncludeSpecs, configParseResult.options.configFile.configFileSpecs.validatedExcludeSpecs, host)), function (f) { return ts.getRelativePathFromFile(ts.getNormalizedAbsolutePath(configFileName, host.getCurrentDirectory()), ts.getNormalizedAbsolutePath(f, host.getCurrentDirectory()), getCanonicalFileName); }); |
| 41159 | var optionMap = serializeCompilerOptions(configParseResult.options, { configFilePath: ts.getNormalizedAbsolutePath(configFileName, host.getCurrentDirectory()), useCaseSensitiveFileNames: host.useCaseSensitiveFileNames }); |
| 41160 | var watchOptionMap = configParseResult.watchOptions && serializeWatchOptions(configParseResult.watchOptions); |
| 41161 | var config = __assign(__assign({ compilerOptions: __assign(__assign({}, optionMapToObject(optionMap)), { showConfig: undefined, configFile: undefined, configFilePath: undefined, help: undefined, init: undefined, listFiles: undefined, listEmittedFiles: undefined, project: undefined, build: undefined, version: undefined }), watchOptions: watchOptionMap && optionMapToObject(watchOptionMap), references: ts.map(configParseResult.projectReferences, function (r) { return (__assign(__assign({}, r), { path: r.originalPath ? r.originalPath : "", originalPath: undefined })); }), files: ts.length(files) ? files : undefined }, (((_c = configParseResult.options.configFile) === null || _c === void 0 ? void 0 : _c.configFileSpecs) ? { |
| 41162 | include: filterSameAsDefaultInclude(configParseResult.options.configFile.configFileSpecs.validatedIncludeSpecs), |
| 41163 | exclude: configParseResult.options.configFile.configFileSpecs.validatedExcludeSpecs |
| 41164 | } : {})), { compileOnSave: !!configParseResult.compileOnSave ? true : undefined }); |
| 41165 | return config; |
| 41166 | } |
| 41167 | ts.convertToTSConfig = convertToTSConfig; |
| 41168 | function optionMapToObject(optionMap) { |
| 41169 | return __assign({}, ts.arrayFrom(optionMap.entries()).reduce(function (prev, cur) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…