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

Function resolveUnionTypeMembers

test/fixtures/snapshot/typescript.js:58272–58279  ·  view source on GitHub ↗
(type)

Source from the content-addressed store, hash-verified

58270 return ts.emptyArray;
58271 }
58272 function resolveUnionTypeMembers(type) {
58273 // The members and properties collections are empty for union types. To get all properties of a union
58274 // type use getPropertiesOfType (only the language service uses this).
58275 var callSignatures = getUnionSignatures(ts.map(type.types, function (t) { return t === globalFunctionType ? [unknownSignature] : getSignaturesOfType(t, 0 /* SignatureKind.Call */); }));
58276 var constructSignatures = getUnionSignatures(ts.map(type.types, function (t) { return getSignaturesOfType(t, 1 /* SignatureKind.Construct */); }));
58277 var indexInfos = getUnionIndexInfos(type.types);
58278 setStructuredTypeMembers(type, emptySymbols, callSignatures, constructSignatures, indexInfos);
58279 }
58280 function intersectTypes(type1, type2) {
58281 return !type1 ? type2 : !type2 ? type1 : getIntersectionType([type1, type2]);
58282 }

Callers 1

Calls 5

getUnionSignaturesFunction · 0.85
getSignaturesOfTypeFunction · 0.85
getUnionIndexInfosFunction · 0.85
setStructuredTypeMembersFunction · 0.85
mapMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…