MCPcopy Create free account
hub / github.com/nodejs/node / createAccessorAccessExpression

Function createAccessorAccessExpression

test/fixtures/snapshot/typescript.js:158114–158117  ·  view source on GitHub ↗
(fieldName, isStatic, container)

Source from the content-addressed store, hash-verified

158112 return ts.isIdentifier(originalName) ? ts.factory.createIdentifier(name) : ts.factory.createStringLiteral(name);
158113 }
158114 function createAccessorAccessExpression(fieldName, isStatic, container) {
158115 var leftHead = isStatic ? container.name : ts.factory.createThis(); // TODO: GH#18217
158116 return ts.isIdentifier(fieldName) ? ts.factory.createPropertyAccessExpression(leftHead, fieldName) : ts.factory.createElementAccessExpression(leftHead, ts.factory.createStringLiteralFromNode(fieldName));
158117 }
158118 function prepareModifierFlagsForAccessor(modifierFlags) {
158119 modifierFlags &= ~64 /* ModifierFlags.Readonly */; // avoid Readonly modifier because it will convert to get accessor
158120 modifierFlags &= ~8 /* ModifierFlags.Private */;

Callers 2

generateGetAccessorFunction · 0.85
generateSetAccessorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected