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

Function substituteNode

test/fixtures/snapshot/typescript.js:109688–109691  ·  view source on GitHub ↗

* Emits a node with possible substitution. * * @param hint A hint as to the intended usage of the node. * @param node The node to emit. * @param emitCallback The callback used to emit the node or its substitute.

(hint, node)

Source from the content-addressed store, hash-verified

109686 * @param emitCallback The callback used to emit the node or its substitute.
109687 */
109688 function substituteNode(hint, node) {
109689 ts.Debug.assert(state < 3 /* TransformationState.Disposed */, "Cannot substitute a node after the result is disposed.");
109690 return node && isSubstitutionEnabled(node) && onSubstituteNode(hint, node) || node;
109691 }
109692 /**
109693 * Enables before/after emit notifications in the pretty printer for the provided SyntaxKind.
109694 */

Callers 2

getPipelinePhaseFunction · 0.85

Calls 3

isSubstitutionEnabledFunction · 0.85
onSubstituteNodeFunction · 0.85
assertMethod · 0.80

Tested by

no test coverage detected