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

Function accessPrivateIdentifier

test/fixtures/snapshot/typescript.js:95727–95746  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

95725 return createHoistedVariableForClass(privateName.substring(1), node.name);
95726 }
95727 function accessPrivateIdentifier(name) {
95728 var _a;
95729 if (currentClassLexicalEnvironment === null || currentClassLexicalEnvironment === void 0 ? void 0 : currentClassLexicalEnvironment.privateIdentifierEnvironment) {
95730 var info = currentClassLexicalEnvironment.privateIdentifierEnvironment.identifiers.get(name.escapedText);
95731 if (info) {
95732 return info;
95733 }
95734 }
95735 for (var i = classLexicalEnvironmentStack.length - 1; i >= 0; --i) {
95736 var env = classLexicalEnvironmentStack[i];
95737 if (!env) {
95738 continue;
95739 }
95740 var info = (_a = env.privateIdentifierEnvironment) === null || _a === void 0 ? void 0 : _a.identifiers.get(name.escapedText);
95741 if (info) {
95742 return info;
95743 }
95744 }
95745 return undefined;
95746 }
95747 function wrapPrivateIdentifierForDestructuringTarget(node) {
95748 var parameter = factory.getGeneratedNameForNode(node);
95749 var info = accessPrivateIdentifier(node.name);

Calls 1

getMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…