MCPcopy Index your code
hub / github.com/nodejs/node / addMethodStatements

Function addMethodStatements

test/fixtures/snapshot/typescript.js:95401–95408  ·  view source on GitHub ↗

* Generates brand-check initializer for private methods. * * @param statements Statement list that should be used to append new statements. * @param methods An array of method declarations. * @param receiver The receiver on which each method should be assigned.

(statements, methods, receiver)

Source from the content-addressed store, hash-verified

95399 * @param receiver The receiver on which each method should be assigned.
95400 */
95401 function addMethodStatements(statements, methods, receiver) {
95402 if (!shouldTransformPrivateElementsOrClassStaticBlocks || !ts.some(methods)) {
95403 return;
95404 }
95405 var weakSetName = getPrivateIdentifierEnvironment().weakSetName;
95406 ts.Debug.assert(weakSetName, "weakSetName should be set in private identifier environment");
95407 statements.push(factory.createExpressionStatement(createPrivateInstanceMethodInitializer(receiver, weakSetName)));
95408 }
95409 function visitInvalidSuperProperty(node) {
95410 return ts.isPropertyAccessExpression(node) ?
95411 factory.updatePropertyAccessExpression(node, factory.createVoidZero(), node.name) :

Callers 1

transformConstructorBodyFunction · 0.85

Calls 5

someMethod · 0.80
assertMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected