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

Function getPropertyOfObjectType

test/fixtures/snapshot/typescript.js:58736–58744  ·  view source on GitHub ↗

If the given type is an object type and that type has a property by the given name, * return the symbol for that property. Otherwise return undefined.

(type, name)

Source from the content-addressed store, hash-verified

58734 * return the symbol for that property. Otherwise return undefined.
58735 */
58736 function getPropertyOfObjectType(type, name) {
58737 if (type.flags & 524288 /* TypeFlags.Object */) {
58738 var resolved = resolveStructuredTypeMembers(type);
58739 var symbol = resolved.members.get(name);
58740 if (symbol && symbolIsValue(symbol)) {
58741 return symbol;
58742 }
58743 }
58744 }
58745 function getPropertiesOfUnionOrIntersectionType(type) {
58746 if (!type.resolvedProperties) {
58747 var members = ts.createSymbolTable();

Callers 9

getPropertyOfTypeFunction · 0.85
appendPropTypeFunction · 0.85
propertiesRelatedToFunction · 0.85
propertiesIdenticalToFunction · 0.85
getSiblingsOfContextFunction · 0.85
isKnownPropertyFunction · 0.85
hasPropFunction · 0.85
_loop_28Function · 0.85

Calls 3

symbolIsValueFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected