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

Function createHoistedVariableForClass

test/fixtures/snapshot/typescript.js:95712–95723  ·  view source on GitHub ↗
(name, node)

Source from the content-addressed store, hash-verified

95710 (_a = getPendingExpressions()).push.apply(_a, assignmentExpressions);
95711 }
95712 function createHoistedVariableForClass(name, node) {
95713 var className = getPrivateIdentifierEnvironment().className;
95714 var prefix = className ? "_".concat(className) : "";
95715 var identifier = factory.createUniqueName("".concat(prefix, "_").concat(name), 16 /* GeneratedIdentifierFlags.Optimistic */);
95716 if (resolver.getNodeCheckFlags(node) & 524288 /* NodeCheckFlags.BlockScopedBindingInLoop */) {
95717 addBlockScopedVariable(identifier);
95718 }
95719 else {
95720 hoistVariableDeclaration(identifier);
95721 }
95722 return identifier;
95723 }
95724 function createHoistedVariableForPrivateName(privateName, node) {
95725 return createHoistedVariableForClass(privateName.substring(1), node.name);
95726 }

Callers 2

visitClassLikeFunction · 0.85

Calls 4

addBlockScopedVariableFunction · 0.85
hoistVariableDeclarationFunction · 0.85
concatMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…