(types)
| 67379 | // of those literal types. Otherwise, return the leftmost type for which no type to the |
| 67380 | // right is a supertype. |
| 67381 | function getSupertypeOrUnion(types) { |
| 67382 | if (types.length === 1) { |
| 67383 | return types[0]; |
| 67384 | } |
| 67385 | return literalTypesWithSameBaseType(types) ? |
| 67386 | getUnionType(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); |
no test coverage detected
searching dependent graphs…