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

Function findMixins

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

Source from the content-addressed store, hash-verified

58281 return !type1 ? type2 : !type2 ? type1 : getIntersectionType([type1, type2]);
58282 }
58283 function findMixins(types) {
58284 var constructorTypeCount = ts.countWhere(types, function (t) { return getSignaturesOfType(t, 1 /* SignatureKind.Construct */).length > 0; });
58285 var mixinFlags = ts.map(types, isMixinConstructorType);
58286 if (constructorTypeCount > 0 && constructorTypeCount === ts.countWhere(mixinFlags, function (b) { return b; })) {
58287 var firstMixinIndex = mixinFlags.indexOf(/*searchElement*/ true);
58288 mixinFlags[firstMixinIndex] = false;
58289 }
58290 return mixinFlags;
58291 }
58292 function includeMixinType(type, types, mixinFlags, index) {
58293 var mixedTypes = [];
58294 for (var i = 0; i < types.length; i++) {

Callers 2

Calls 3

getSignaturesOfTypeFunction · 0.85
mapMethod · 0.65
indexOfMethod · 0.45

Tested by

no test coverage detected