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

Function bindObjectDefinePrototypeProperty

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

Source from the content-addressed store, hash-verified

47299 bindPropertyAssignment(node.left.expression, node.left, /*isPrototypeProperty*/ false, /*containerIsClass*/ true);
47300 }
47301 function bindObjectDefinePrototypeProperty(node) {
47302 var namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0].expression);
47303 if (namespaceSymbol && namespaceSymbol.valueDeclaration) {
47304 // Ensure the namespace symbol becomes class-like
47305 addDeclarationToSymbol(namespaceSymbol, namespaceSymbol.valueDeclaration, 32 /* SymbolFlags.Class */);
47306 }
47307 bindPotentiallyNewExpandoMemberToNamespace(node, namespaceSymbol, /*isPrototypeProperty*/ true);
47308 }
47309 /**
47310 * For `x.prototype.y = z`, declare a member `y` on `x` if `x` is a function or class, or not declared.
47311 * Note that jsdoc preceding an ExpressionStatement like `x.prototype.y;` is also treated as a declaration.

Callers 1

bindWorkerFunction · 0.85

Tested by

no test coverage detected