* 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)
| 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: |
nothing calls this directly
no test coverage detected
searching dependent graphs…