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

Function isPrototypeProperty

test/fixtures/snapshot/typescript.js:74318–74327  ·  view source on GitHub ↗

* Return whether this symbol is a member of a prototype somewhere * Note that this is not tracked well within the compiler, so the answer may be incorrect.

(symbol)

Source from the content-addressed store, hash-verified

74316 * Note that this is not tracked well within the compiler, so the answer may be incorrect.
74317 */
74318 function isPrototypeProperty(symbol) {
74319 if (symbol.flags & 8192 /* SymbolFlags.Method */ || ts.getCheckFlags(symbol) & 4 /* CheckFlags.SyntheticMethod */) {
74320 return true;
74321 }
74322 if (ts.isInJSFile(symbol.valueDeclaration)) {
74323 var parent = symbol.valueDeclaration.parent;
74324 return parent && ts.isBinaryExpression(parent) &&
74325 ts.getAssignmentDeclarationKind(parent) === 3 /* AssignmentDeclarationKind.PrototypeProperty */;
74326 }
74327 }
74328 /**
74329 * Check whether the requested property access is valid.
74330 * Returns true if node is a valid property access, and false otherwise.

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…