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

Function getPipelinePhase

test/fixtures/snapshot/typescript.js:111032–111062  ·  view source on GitHub ↗
(phase, emitHint, node)

Source from the content-addressed store, hash-verified

111030 !ts.isUnparsedPrepend(node);
111031 }
111032 function getPipelinePhase(phase, emitHint, node) {
111033 switch (phase) {
111034 case 0 /* PipelinePhase.Notification */:
111035 if (onEmitNode !== ts.noEmitNotification && (!isEmitNotificationEnabled || isEmitNotificationEnabled(node))) {
111036 return pipelineEmitWithNotification;
111037 }
111038 // falls through
111039 case 1 /* PipelinePhase.Substitution */:
111040 if (substituteNode !== ts.noEmitSubstitution && (lastSubstitution = substituteNode(emitHint, node) || node) !== node) {
111041 if (currentParenthesizerRule) {
111042 lastSubstitution = currentParenthesizerRule(lastSubstitution);
111043 }
111044 return pipelineEmitWithSubstitution;
111045 }
111046 // falls through
111047 case 2 /* PipelinePhase.Comments */:
111048 if (shouldEmitComments(node)) {
111049 return pipelineEmitWithComments;
111050 }
111051 // falls through
111052 case 3 /* PipelinePhase.SourceMaps */:
111053 if (shouldEmitSourceMaps(node)) {
111054 return pipelineEmitWithSourceMaps;
111055 }
111056 // falls through
111057 case 4 /* PipelinePhase.Emit */:
111058 return pipelineEmitWithHint;
111059 default:
111060 return ts.Debug.assertNever(phase);
111061 }
111062 }
111063 function getNextPipelinePhase(currentPhase, emitHint, node) {
111064 return getPipelinePhase(currentPhase + 1, emitHint, node);
111065 }

Callers 3

pipelineEmitFunction · 0.85
getNextPipelinePhaseFunction · 0.85
maybeEmitExpressionFunction · 0.85

Calls 4

substituteNodeFunction · 0.85
shouldEmitCommentsFunction · 0.85
shouldEmitSourceMapsFunction · 0.85

Tested by

no test coverage detected