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

Function substitutePropertyAssignment

test/fixtures/snapshot/typescript.js:101741–101747  ·  view source on GitHub ↗

* Substitutes a PropertyAssignment whose name is a reserved word. * * @param node A PropertyAssignment

(node)

Source from the content-addressed store, hash-verified

101739 * @param node A PropertyAssignment
101740 */
101741 function substitutePropertyAssignment(node) {
101742 var literalName = ts.isIdentifier(node.name) && trySubstituteReservedName(node.name);
101743 if (literalName) {
101744 return factory.updatePropertyAssignment(node, literalName, node.initializer);
101745 }
101746 return node;
101747 }
101748 /**
101749 * If an identifier name is a reserved word, returns a string literal for the name.
101750 *

Callers 1

onSubstituteNodeFunction · 0.85

Calls 1

Tested by

no test coverage detected