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

Function insertCaptureThisForNode

test/fixtures/snapshot/typescript.js:99525–99536  ·  view source on GitHub ↗
(statements, node, initializer)

Source from the content-addressed store, hash-verified

99523 ts.setCommentRange(assignSuperExpression, ts.getOriginalNode(superExpression).parent);
99524 }
99525 function insertCaptureThisForNode(statements, node, initializer) {
99526 enableSubstitutionsForCapturedThis();
99527 var captureThisStatement = factory.createVariableStatement(
99528 /*modifiers*/ undefined, factory.createVariableDeclarationList([
99529 factory.createVariableDeclaration(factory.createUniqueName("_this", 16 /* GeneratedIdentifierFlags.Optimistic */ | 32 /* GeneratedIdentifierFlags.FileLevel */),
99530 /*exclamationToken*/ undefined,
99531 /*type*/ undefined, initializer)
99532 ]));
99533 ts.setEmitFlags(captureThisStatement, 1536 /* EmitFlags.NoComments */ | 1048576 /* EmitFlags.CustomPrologue */);
99534 ts.setSourceMapRange(captureThisStatement, node);
99535 ts.insertStatementAfterCustomPrologue(statements, captureThisStatement);
99536 }
99537 function insertCaptureNewTargetIfNeeded(statements, node, copyOnWrite) {
99538 if (hierarchyFacts & 32768 /* HierarchyFacts.NewTarget */) {
99539 var newTarget = void 0;

Callers 2

transformConstructorBodyFunction · 0.85

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…