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

Function createPropertyAccessChain

test/fixtures/snapshot/typescript.js:24043–24057  ·  view source on GitHub ↗
(expression, questionDotToken, name)

Source from the content-addressed store, hash-verified

24041 }
24042 // @api
24043 function createPropertyAccessChain(expression, questionDotToken, name) {
24044 var node = createBaseExpression(206 /* SyntaxKind.PropertyAccessExpression */);
24045 node.flags |= 32 /* NodeFlags.OptionalChain */;
24046 node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression);
24047 node.questionDotToken = questionDotToken;
24048 node.name = asName(name);
24049 node.transformFlags |=
24050 32 /* TransformFlags.ContainsES2020 */ |
24051 propagateChildFlags(node.expression) |
24052 propagateChildFlags(node.questionDotToken) |
24053 (ts.isIdentifier(node.name) ?
24054 propagateIdentifierNameFlags(node.name) :
24055 propagateChildFlags(node.name));
24056 return node;
24057 }
24058 // @api
24059 function updatePropertyAccessChain(node, expression, questionDotToken, name) {
24060 ts.Debug.assert(!!(node.flags & 32 /* NodeFlags.OptionalChain */), "Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead.");

Callers 3

createNodeFactoryFunction · 0.85
createMethodCallFunction · 0.85

Calls 4

createBaseExpressionFunction · 0.85
asNameFunction · 0.85
propagateChildFlagsFunction · 0.85

Tested by

no test coverage detected