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

Function bindOptionalChainRest

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

Source from the content-addressed store, hash-verified

46104 }
46105 }
46106 function bindOptionalChainRest(node) {
46107 switch (node.kind) {
46108 case 206 /* SyntaxKind.PropertyAccessExpression */:
46109 bind(node.questionDotToken);
46110 bind(node.name);
46111 break;
46112 case 207 /* SyntaxKind.ElementAccessExpression */:
46113 bind(node.questionDotToken);
46114 bind(node.argumentExpression);
46115 break;
46116 case 208 /* SyntaxKind.CallExpression */:
46117 bind(node.questionDotToken);
46118 bindEach(node.typeArguments);
46119 bindEach(node.arguments);
46120 break;
46121 }
46122 }
46123 function bindOptionalChain(node, trueTarget, falseTarget) {
46124 // For an optional chain, we emulate the behavior of a logical expression:
46125 //

Callers

nothing calls this directly

Calls 2

bindEachFunction · 0.85
bindFunction · 0.70

Tested by

no test coverage detected