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

Function bindCallExpressionFlow

test/fixtures/snapshot/typescript.js:46172–46199  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

46170 }
46171 }
46172 function bindCallExpressionFlow(node) {
46173 if (ts.isOptionalChain(node)) {
46174 bindOptionalChainFlow(node);
46175 }
46176 else {
46177 // If the target of the call expression is a function expression or arrow function we have
46178 // an immediately invoked function expression (IIFE). Initialize the flowNode property to
46179 // the current control flow (which includes evaluation of the IIFE arguments).
46180 var expr = ts.skipParentheses(node.expression);
46181 if (expr.kind === 213 /* SyntaxKind.FunctionExpression */ || expr.kind === 214 /* SyntaxKind.ArrowFunction */) {
46182 bindEach(node.typeArguments);
46183 bindEach(node.arguments);
46184 bind(node.expression);
46185 }
46186 else {
46187 bindEachChild(node);
46188 if (node.expression.kind === 106 /* SyntaxKind.SuperKeyword */) {
46189 currentFlow = createFlowCall(currentFlow, node);
46190 }
46191 }
46192 }
46193 if (node.expression.kind === 206 /* SyntaxKind.PropertyAccessExpression */) {
46194 var propertyAccess = node.expression;
46195 if (ts.isIdentifier(propertyAccess.name) && isNarrowableOperand(propertyAccess.expression) && ts.isPushOrUnshiftIdentifier(propertyAccess.name)) {
46196 currentFlow = createFlowMutation(256 /* FlowFlags.ArrayMutation */, currentFlow, node);
46197 }
46198 }
46199 }
46200 function getContainerFlags(node) {
46201 switch (node.kind) {
46202 case 226 /* SyntaxKind.ClassExpression */:

Callers 1

bindChildrenFunction · 0.85

Calls 7

bindOptionalChainFlowFunction · 0.85
bindEachFunction · 0.85
bindEachChildFunction · 0.85
createFlowCallFunction · 0.85
isNarrowableOperandFunction · 0.85
createFlowMutationFunction · 0.85
bindFunction · 0.70

Tested by

no test coverage detected