* For `x.prototype.y = z`, declare a member `y` on `x` if `x` is a function or class, or not declared. * Note that jsdoc preceding an ExpressionStatement like `x.prototype.y;` is also treated as a declaration.
(lhs, parent)
| 47311 | * Note that jsdoc preceding an ExpressionStatement like `x.prototype.y;` is also treated as a declaration. |
| 47312 | */ |
| 47313 | function bindPrototypePropertyAssignment(lhs, parent) { |
| 47314 | // Look up the function in the local scope, since prototype assignments should |
| 47315 | // follow the function declaration |
| 47316 | var classPrototype = lhs.expression; |
| 47317 | var constructorFunction = classPrototype.expression; |
| 47318 | // Fix up parent pointers since we're going to use these nodes before we bind into them |
| 47319 | ts.setParent(constructorFunction, classPrototype); |
| 47320 | ts.setParent(classPrototype, lhs); |
| 47321 | ts.setParent(lhs, parent); |
| 47322 | bindPropertyAssignment(constructorFunction, lhs, /*isPrototypeProperty*/ true, /*containerIsClass*/ true); |
| 47323 | } |
| 47324 | function bindObjectDefinePropertyAssignment(node) { |
| 47325 | var namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0]); |
| 47326 | var isToplevel = node.parent.parent.kind === 305 /* SyntaxKind.SourceFile */; |
no test coverage detected