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

Function createPrependNodes

test/fixtures/snapshot/typescript.js:119456–119474  ·  view source on GitHub ↗
(projectReferences, getCommandLine, readFile)

Source from the content-addressed store, hash-verified

119454 ts.parseConfigHostFromCompilerHostLike = parseConfigHostFromCompilerHostLike;
119455 /* @internal */
119456 function createPrependNodes(projectReferences, getCommandLine, readFile) {
119457 if (!projectReferences)
119458 return ts.emptyArray;
119459 var nodes;
119460 for (var i = 0; i < projectReferences.length; i++) {
119461 var ref = projectReferences[i];
119462 var resolvedRefOpts = getCommandLine(ref, i);
119463 if (ref.prepend && resolvedRefOpts && resolvedRefOpts.options) {
119464 var out = ts.outFile(resolvedRefOpts.options);
119465 // Upstream project didn't have outFile set -- skip (error will have been issued earlier)
119466 if (!out)
119467 continue;
119468 var _a = ts.getOutputPathsForBundle(resolvedRefOpts.options, /*forceDtsPaths*/ true), jsFilePath = _a.jsFilePath, sourceMapFilePath = _a.sourceMapFilePath, declarationFilePath = _a.declarationFilePath, declarationMapPath = _a.declarationMapPath, buildInfoPath = _a.buildInfoPath;
119469 var node = ts.createInputFiles(readFile, jsFilePath, sourceMapFilePath, declarationFilePath, declarationMapPath, buildInfoPath);
119470 (nodes || (nodes = [])).push(node);
119471 }
119472 }
119473 return nodes || ts.emptyArray;
119474 }
119475 ts.createPrependNodes = createPrependNodes;
119476 function resolveProjectReferencePath(hostOrRef, ref) {
119477 var passedInRef = ref ? ref : hostOrRef;

Callers 1

getPrependNodesFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…