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

Function getAllPossiblePropertiesOfTypes

test/fixtures/snapshot/typescript.js:58794–58813  ·  view source on GitHub ↗
(types)

Source from the content-addressed store, hash-verified

58792 });
58793 }
58794 function getAllPossiblePropertiesOfTypes(types) {
58795 var unionType = getUnionType(types);
58796 if (!(unionType.flags & 1048576 /* TypeFlags.Union */)) {
58797 return getAugmentedPropertiesOfType(unionType);
58798 }
58799 var props = ts.createSymbolTable();
58800 for (var _i = 0, types_4 = types; _i < types_4.length; _i++) {
58801 var memberType = types_4[_i];
58802 for (var _a = 0, _b = getAugmentedPropertiesOfType(memberType); _a < _b.length; _a++) {
58803 var escapedName = _b[_a].escapedName;
58804 if (!props.has(escapedName)) {
58805 var prop = createUnionOrIntersectionProperty(unionType, escapedName);
58806 // May be undefined if the property is private
58807 if (prop)
58808 props.set(escapedName, prop);
58809 }
58810 }
58811 }
58812 return ts.arrayFrom(props.values());
58813 }
58814 function getConstraintOfType(type) {
58815 return type.flags & 262144 /* TypeFlags.TypeParameter */ ? getConstraintOfTypeParameter(type) :
58816 type.flags & 8388608 /* TypeFlags.IndexedAccess */ ? getConstraintOfIndexedAccess(type) :

Callers

nothing calls this directly

Calls 6

getUnionTypeFunction · 0.85
hasMethod · 0.65
setMethod · 0.45
valuesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…