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

Function finishEmit

test/fixtures/snapshot/typescript.js:124692–124716  ·  view source on GitHub ↗
(emitterDiagnostics, emittedOutputs, priorNewestUpdateTime, newestDeclarationFileContentChangedTimeIsMaximumDate, oldestOutputFileName, resultFlags)

Source from the content-addressed store, hash-verified

124690 return emitResult;
124691 }
124692 function finishEmit(emitterDiagnostics, emittedOutputs, priorNewestUpdateTime, newestDeclarationFileContentChangedTimeIsMaximumDate, oldestOutputFileName, resultFlags) {
124693 var _a;
124694 var emitDiagnostics = emitterDiagnostics.getDiagnostics();
124695 if (emitDiagnostics.length) {
124696 (_a = buildErrors(state, projectPath, program, config, emitDiagnostics, BuildResultFlags.EmitErrors, "Emit"), buildResult = _a.buildResult, step = _a.step);
124697 return emitDiagnostics;
124698 }
124699 if (state.write) {
124700 emittedOutputs.forEach(function (name) { return listEmittedFile(state, config, name); });
124701 }
124702 // Update time stamps for rest of the outputs
124703 var newestDeclarationFileContentChangedTime = updateOutputTimestampsWorker(state, config, priorNewestUpdateTime, ts.Diagnostics.Updating_unchanged_output_timestamps_of_project_0, emittedOutputs);
124704 state.diagnostics.delete(projectPath);
124705 state.projectStatus.set(projectPath, {
124706 type: ts.UpToDateStatusType.UpToDate,
124707 newestDeclarationFileContentChangedTime: newestDeclarationFileContentChangedTimeIsMaximumDate ?
124708 maximumDate :
124709 newestDeclarationFileContentChangedTime,
124710 oldestOutputFileName: oldestOutputFileName
124711 });
124712 afterProgramDone(state, program, config);
124713 step = BuildStep.QueueReferencingProjects;
124714 buildResult = resultFlags;
124715 return emitDiagnostics;
124716 }
124717 function emitBundle(writeFileCallback, customTransformers) {
124718 var _a, _b;
124719 ts.Debug.assert(kind === InvalidatedProjectKind.UpdateBundle);

Callers 2

emitFunction · 0.85
emitBundleFunction · 0.85

Calls 7

buildErrorsFunction · 0.85
listEmittedFileFunction · 0.85
afterProgramDoneFunction · 0.85
forEachMethod · 0.65
deleteMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected