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

Function forEachProperty

test/fixtures/snapshot/typescript.js:67126–67139  ·  view source on GitHub ↗
(prop, callback)

Source from the content-addressed store, hash-verified

67124 // Invoke the callback for each underlying property symbol of the given symbol and return the first
67125 // value that isn't undefined.
67126 function forEachProperty(prop, callback) {
67127 if (ts.getCheckFlags(prop) & 6 /* CheckFlags.Synthetic */) {
67128 for (var _i = 0, _a = prop.containingType.types; _i < _a.length; _i++) {
67129 var t = _a[_i];
67130 var p = getPropertyOfType(t, prop.escapedName);
67131 var result = p && forEachProperty(p, callback);
67132 if (result) {
67133 return result;
67134 }
67135 }
67136 return undefined;
67137 }
67138 return callback(prop);
67139 }
67140 // Return the declaring class type of a property or undefined if property not declared in class
67141 function getDeclaringClass(prop) {
67142 return prop.parent && prop.parent.flags & 32 /* SymbolFlags.Class */ ? getDeclaredTypeOfSymbol(getParentOfSymbol(prop)) : undefined;

Callers 5

isValidOverrideOfFunction · 0.85
updateTsconfigFilesFunction · 0.85

Calls 3

getPropertyOfTypeFunction · 0.85
callbackFunction · 0.70
cbFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…