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

Function updatePropertyAccessChain

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

Source from the content-addressed store, hash-verified

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.");
24061 // Because we are updating an existing PropertyAccessChain we want to inherit its emitFlags
24062 // instead of using the default from createPropertyAccess
24063 return node.expression !== expression
24064 || node.questionDotToken !== questionDotToken
24065 || node.name !== name
24066 ? update(createPropertyAccessChain(expression, questionDotToken, name), node)
24067 : node;
24068 }
24069 // @api
24070 function createElementAccessExpression(expression, index) {
24071 var node = createBaseExpression(207 /* SyntaxKind.ElementAccessExpression */);

Callers 1

Calls 3

assertMethod · 0.80
updateFunction · 0.70

Tested by

no test coverage detected