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

Function getIntersectionTypeFacts

test/fixtures/snapshot/typescript.js:69668–69680  ·  view source on GitHub ↗
(type, ignoreObjects)

Source from the content-addressed store, hash-verified

69666 return 16777215 /* TypeFacts.All */;
69667 }
69668 function getIntersectionTypeFacts(type, ignoreObjects) {
69669 // When computing the type facts of an intersection type, certain type facts are computed as `and`
69670 // and others are computed as `or`.
69671 var oredFacts = 0 /* TypeFacts.None */;
69672 var andedFacts = 16777215 /* TypeFacts.All */;
69673 for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
69674 var t = _a[_i];
69675 var f = getTypeFacts(t, ignoreObjects);
69676 oredFacts |= f;
69677 andedFacts &= f;
69678 }
69679 return oredFacts & 8256 /* TypeFacts.OrFactsMask */ | andedFacts & 16768959 /* TypeFacts.AndFactsMask */;
69680 }
69681 function getTypeWithFacts(type, include) {
69682 return filterType(type, function (t) { return (getTypeFacts(t) & include) !== 0; });
69683 }

Callers 1

getTypeFactsFunction · 0.85

Calls 1

getTypeFactsFunction · 0.85

Tested by

no test coverage detected