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

Function getMatchingUnionConstituentForType

test/fixtures/snapshot/typescript.js:69512–69516  ·  view source on GitHub ↗
(unionType, type)

Source from the content-addressed store, hash-verified

69510 return result !== unknownType ? result : undefined;
69511 }
69512 function getMatchingUnionConstituentForType(unionType, type) {
69513 var keyPropertyName = getKeyPropertyName(unionType);
69514 var propType = keyPropertyName && getTypeOfPropertyOfType(type, keyPropertyName);
69515 return propType && getConstituentTypeForKeyType(unionType, propType);
69516 }
69517 function getMatchingUnionConstituentForObjectLiteral(unionType, node) {
69518 var keyPropertyName = getKeyPropertyName(unionType);
69519 var propNode = keyPropertyName && ts.find(node.properties, function (p) { return p.symbol && p.kind === 296 /* SyntaxKind.PropertyAssignment */ &&

Callers 2

typeRelatedToSomeTypeFunction · 0.85

Calls 3

getKeyPropertyNameFunction · 0.85
getTypeOfPropertyOfTypeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…