(types)
| 67387 | ts.reduceLeft(types, function (s, t) { return isTypeSubtypeOf(s, t) ? t : s; }); |
| 67388 | } |
| 67389 | function getCommonSupertype(types) { |
| 67390 | if (!strictNullChecks) { |
| 67391 | return getSupertypeOrUnion(types); |
| 67392 | } |
| 67393 | var primaryTypes = ts.filter(types, function (t) { return !(t.flags & 98304 /* TypeFlags.Nullable */); }); |
| 67394 | return primaryTypes.length ? |
| 67395 | getNullableType(getSupertypeOrUnion(primaryTypes), getFalsyFlagsOfTypes(types) & 98304 /* TypeFlags.Nullable */) : |
| 67396 | getUnionType(types, 2 /* UnionReduction.Subtype */); |
| 67397 | } |
| 67398 | // Return the leftmost type for which no type to the right is a subtype. |
| 67399 | function getCommonSubtype(types) { |
| 67400 | return ts.reduceLeft(types, function (s, t) { return isTypeSubtypeOf(t, s) ? t : s; }); |
no test coverage detected
searching dependent graphs…