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

Function getParsedCommandLineOfConfigFile

test/fixtures/snapshot/typescript.js:40766–40779  ·  view source on GitHub ↗

* Reads the config file, reports errors if any and exits if the config file cannot be found

(configFileName, optionsToExtend, host, extendedConfigCache, watchOptionsToExtend, extraFileExtensions)

Source from the content-addressed store, hash-verified

40764 * Reads the config file, reports errors if any and exits if the config file cannot be found
40765 */
40766 function getParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host, extendedConfigCache, watchOptionsToExtend, extraFileExtensions) {
40767 var configFileText = tryReadFile(configFileName, function (fileName) { return host.readFile(fileName); });
40768 if (!ts.isString(configFileText)) {
40769 host.onUnRecoverableConfigFileDiagnostic(configFileText);
40770 return undefined;
40771 }
40772 var result = ts.parseJsonText(configFileName, configFileText);
40773 var cwd = host.getCurrentDirectory();
40774 result.path = ts.toPath(configFileName, cwd, ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames));
40775 result.resolvedPath = result.path;
40776 result.originalFileName = result.fileName;
40777 return parseJsonSourceFileConfigFileContent(result, host, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), cwd), optionsToExtend, ts.getNormalizedAbsolutePath(configFileName, cwd),
40778 /*resolutionStack*/ undefined, extraFileExtensions, extendedConfigCache, watchOptionsToExtend);
40779 }
40780 ts.getParsedCommandLineOfConfigFile = getParsedCommandLineOfConfigFile;
40781 /**
40782 * Read tsconfig.json file

Callers

nothing calls this directly

Calls 3

tryReadFileFunction · 0.85
readFileMethod · 0.45

Tested by

no test coverage detected