MCPcopy Create free account
hub / github.com/babel/babel / thisRef

Function thisRef

packages/babel-plugin-transform-classes/src/transformClass.ts:348–353  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

346 path.traverse(findThisesVisitor);
347
348 let thisRef = function () {
349 const ref = path.scope.generateDeclaredUidIdentifier("this");
350 maxGuaranteedSuperBeforeIndex++;
351 thisRef = () => t.cloneNode(ref);
352 return ref;
353 };
354
355 const buildAssertThisInitialized = function () {
356 if (assumptions.noUninitializedThis) return thisRef();

Callers 3

wrapSuperCallFunction · 0.85
verifyConstructorFunction · 0.85

Calls 1

Tested by

no test coverage detected