MCPcopy Create free account
hub / github.com/nodejs/node / parseOwnConfigOfJson

Function parseOwnConfigOfJson

test/fixtures/snapshot/typescript.js:41689–41710  ·  view source on GitHub ↗
(json, host, basePath, configFileName, errors)

Source from the content-addressed store, hash-verified

41687 return ownConfig;
41688 }
41689 function parseOwnConfigOfJson(json, host, basePath, configFileName, errors) {
41690 if (ts.hasProperty(json, "excludes")) {
41691 errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unknown_option_excludes_Did_you_mean_exclude));
41692 }
41693 var options = convertCompilerOptionsFromJsonWorker(json.compilerOptions, basePath, errors, configFileName);
41694 // typingOptions has been deprecated and is only supported for backward compatibility purposes.
41695 // It should be removed in future releases - use typeAcquisition instead.
41696 var typeAcquisition = convertTypeAcquisitionFromJsonWorker(json.typeAcquisition || json.typingOptions, basePath, errors, configFileName);
41697 var watchOptions = convertWatchOptionsFromJsonWorker(json.watchOptions, basePath, errors);
41698 json.compileOnSave = convertCompileOnSaveOptionFromJson(json, basePath, errors);
41699 var extendedConfigPath;
41700 if (json.extends) {
41701 if (!ts.isString(json.extends)) {
41702 errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "extends", "string"));
41703 }
41704 else {
41705 var newBase = configFileName ? directoryOfCombinedPath(configFileName, basePath) : basePath;
41706 extendedConfigPath = getExtendsConfigPath(json.extends, host, newBase, errors, ts.createCompilerDiagnostic);
41707 }
41708 }
41709 return { raw: json, options: options, watchOptions: watchOptions, typeAcquisition: typeAcquisition, extendedConfigPath: extendedConfigPath };
41710 }
41711 function parseOwnConfigOfJsonSourceFile(sourceFile, host, basePath, configFileName, errors) {
41712 var options = getDefaultCompilerOptions(configFileName);
41713 var typeAcquisition, typingOptionstypeAcquisition;

Callers 1

parseConfigFunction · 0.85

Tested by

no test coverage detected