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

Function getAccessedPropertyName

test/fixtures/snapshot/typescript.js:69352–69367  ·  view source on GitHub ↗
(access)

Source from the content-addressed store, hash-verified

69350 return false;
69351 }
69352 function getAccessedPropertyName(access) {
69353 if (ts.isPropertyAccessExpression(access)) {
69354 return access.name.escapedText;
69355 }
69356 if (ts.isElementAccessExpression(access)) {
69357 return tryGetElementAccessExpressionName(access);
69358 }
69359 if (ts.isBindingElement(access)) {
69360 var name = getDestructuringPropertyName(access);
69361 return name ? ts.escapeLeadingUnderscores(name) : undefined;
69362 }
69363 if (ts.isParameter(access)) {
69364 return ("" + access.parent.parameters.indexOf(access));
69365 }
69366 return undefined;
69367 }
69368 function tryGetNameFromType(type) {
69369 return type.flags & 8192 /* TypeFlags.UniqueESSymbol */ ? type.escapedName :
69370 type.flags & 384 /* TypeFlags.StringOrNumberLiteral */ ? ts.escapeLeadingUnderscores("" + type.value) : undefined;

Calls 3

indexOfMethod · 0.45

Tested by

no test coverage detected