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

Function onSubstituteNode

test/fixtures/snapshot/typescript.js:94139–94148  ·  view source on GitHub ↗

* Hooks node substitutions. * * @param hint A hint as to the intended usage of the node. * @param node The node to substitute.

(hint, node)

Source from the content-addressed store, hash-verified

94137 * @param node The node to substitute.
94138 */
94139 function onSubstituteNode(hint, node) {
94140 node = previousOnSubstituteNode(hint, node);
94141 if (hint === 1 /* EmitHint.Expression */) {
94142 return substituteExpression(node);
94143 }
94144 else if (ts.isShorthandPropertyAssignment(node)) {
94145 return substituteShorthandPropertyAssignment(node);
94146 }
94147 return node;
94148 }
94149 function substituteShorthandPropertyAssignment(node) {
94150 if (enabledSubstitutions & 2 /* TypeScriptSubstitutionFlags.NamespaceExports */) {
94151 var name = node.name;

Callers 1

substituteNodeFunction · 0.85

Calls 9

substituteExpressionFunction · 0.85
substituteIdentifierFunction · 0.85
isSubstitutionPreventedFunction · 0.85
substituteUnspecifiedFunction · 0.85
substituteHelperNameFunction · 0.85
assertMethod · 0.80

Tested by

no test coverage detected