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

Function createCallChain

test/fixtures/snapshot/typescript.js:24154–24174  ·  view source on GitHub ↗
(expression, questionDotToken, typeArguments, argumentsArray)

Source from the content-addressed store, hash-verified

24152 }
24153 // @api
24154 function createCallChain(expression, questionDotToken, typeArguments, argumentsArray) {
24155 var node = createBaseExpression(208 /* SyntaxKind.CallExpression */);
24156 node.flags |= 32 /* NodeFlags.OptionalChain */;
24157 node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression);
24158 node.questionDotToken = questionDotToken;
24159 node.typeArguments = asNodeArray(typeArguments);
24160 node.arguments = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(createNodeArray(argumentsArray));
24161 node.transformFlags |=
24162 propagateChildFlags(node.expression) |
24163 propagateChildFlags(node.questionDotToken) |
24164 propagateChildrenFlags(node.typeArguments) |
24165 propagateChildrenFlags(node.arguments) |
24166 32 /* TransformFlags.ContainsES2020 */;
24167 if (node.typeArguments) {
24168 node.transformFlags |= 1 /* TransformFlags.ContainsTypeScript */;
24169 }
24170 if (ts.isSuperProperty(node.expression)) {
24171 node.transformFlags |= 8192 /* TransformFlags.ContainsLexicalThis */;
24172 }
24173 return node;
24174 }
24175 // @api
24176 function updateCallChain(node, expression, questionDotToken, typeArguments, argumentsArray) {
24177 ts.Debug.assert(!!(node.flags & 32 /* NodeFlags.OptionalChain */), "Cannot update a CallExpression using updateCallChain. Use updateCall instead.");

Callers 2

updateCallChainFunction · 0.85
createMethodCallFunction · 0.85

Calls 5

createBaseExpressionFunction · 0.85
asNodeArrayFunction · 0.85
createNodeArrayFunction · 0.85
propagateChildFlagsFunction · 0.85
propagateChildrenFlagsFunction · 0.85

Tested by

no test coverage detected