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

Function getAssignedExpandoInitializer

test/fixtures/snapshot/typescript.js:16441–16453  ·  view source on GitHub ↗

* Get the assignment 'initializer' -- the righthand side-- when the initializer is container-like (See getExpandoInitializer). * We treat the right hand side of assignments with container-like initializers as declarations.

(node)

Source from the content-addressed store, hash-verified

16439 * We treat the right hand side of assignments with container-like initializers as declarations.
16440 */
16441 function getAssignedExpandoInitializer(node) {
16442 if (node && node.parent && ts.isBinaryExpression(node.parent) && node.parent.operatorToken.kind === 63 /* SyntaxKind.EqualsToken */) {
16443 var isPrototypeAssignment = isPrototypeAccess(node.parent.left);
16444 return getExpandoInitializer(node.parent.right, isPrototypeAssignment) ||
16445 getDefaultedExpandoInitializer(node.parent.left, node.parent.right, isPrototypeAssignment);
16446 }
16447 if (node && ts.isCallExpression(node) && isBindableObjectDefinePropertyCall(node)) {
16448 var result = hasExpandoValueProperty(node.arguments[2], node.arguments[1].text === "prototype");
16449 if (result) {
16450 return result;
16451 }
16452 }
16453 }
16454 ts.getAssignedExpandoInitializer = getAssignedExpandoInitializer;
16455 /**
16456 * Recognized expando initializers are:

Callers

nothing calls this directly

Calls 5

isPrototypeAccessFunction · 0.85
getExpandoInitializerFunction · 0.85
hasExpandoValuePropertyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…