(source, target)
| 69858 | return source === target || target.flags & 1048576 /* TypeFlags.Union */ && isTypeSubsetOfUnion(source, target); |
| 69859 | } |
| 69860 | function isTypeSubsetOfUnion(source, target) { |
| 69861 | if (source.flags & 1048576 /* TypeFlags.Union */) { |
| 69862 | for (var _i = 0, _a = source.types; _i < _a.length; _i++) { |
| 69863 | var t = _a[_i]; |
| 69864 | if (!containsType(target.types, t)) { |
| 69865 | return false; |
| 69866 | } |
| 69867 | } |
| 69868 | return true; |
| 69869 | } |
| 69870 | if (source.flags & 1024 /* TypeFlags.EnumLiteral */ && getBaseTypeOfEnumLiteralType(source) === target) { |
| 69871 | return true; |
| 69872 | } |
| 69873 | return containsType(target.types, source); |
| 69874 | } |
| 69875 | function forEachType(type, f) { |
| 69876 | return type.flags & 1048576 /* TypeFlags.Union */ ? ts.forEach(type.types, f) : f(type); |
| 69877 | } |
no test coverage detected
searching dependent graphs…