MCPcopy Index your code
hub / github.com/nodejs/node / getExtendedConfig

Function getExtendedConfig

test/fixtures/snapshot/typescript.js:41798–41827  ·  view source on GitHub ↗
(sourceFile, extendedConfigPath, host, resolutionStack, errors, extendedConfigCache)

Source from the content-addressed store, hash-verified

41796 return undefined;
41797 }
41798 function getExtendedConfig(sourceFile, extendedConfigPath, host, resolutionStack, errors, extendedConfigCache) {
41799 var _a;
41800 var path = host.useCaseSensitiveFileNames ? extendedConfigPath : ts.toFileNameLowerCase(extendedConfigPath);
41801 var value;
41802 var extendedResult;
41803 var extendedConfig;
41804 if (extendedConfigCache && (value = extendedConfigCache.get(path))) {
41805 (extendedResult = value.extendedResult, extendedConfig = value.extendedConfig);
41806 }
41807 else {
41808 extendedResult = readJsonConfigFile(extendedConfigPath, function (path) { return host.readFile(path); });
41809 if (!extendedResult.parseDiagnostics.length) {
41810 extendedConfig = parseConfig(/*json*/ undefined, extendedResult, host, ts.getDirectoryPath(extendedConfigPath), ts.getBaseFileName(extendedConfigPath), resolutionStack, errors, extendedConfigCache);
41811 }
41812 if (extendedConfigCache) {
41813 extendedConfigCache.set(path, { extendedResult: extendedResult, extendedConfig: extendedConfig });
41814 }
41815 }
41816 if (sourceFile) {
41817 sourceFile.extendedSourceFiles = [extendedResult.fileName];
41818 if (extendedResult.extendedSourceFiles) {
41819 (_a = sourceFile.extendedSourceFiles).push.apply(_a, extendedResult.extendedSourceFiles);
41820 }
41821 }
41822 if (extendedResult.parseDiagnostics.length) {
41823 errors.push.apply(errors, extendedResult.parseDiagnostics);
41824 return undefined;
41825 }
41826 return extendedConfig;
41827 }
41828 function convertCompileOnSaveOptionFromJson(jsonOption, basePath, errors) {
41829 if (!ts.hasProperty(jsonOption, ts.compileOnSaveCommandLineOption.name)) {
41830 return false;

Callers 1

parseConfigFunction · 0.85

Calls 6

readJsonConfigFileFunction · 0.85
parseConfigFunction · 0.85
getMethod · 0.65
readFileMethod · 0.45
setMethod · 0.45
applyMethod · 0.45

Tested by

no test coverage detected