(types)
| 67362 | 0 /* Ternary.False */; |
| 67363 | } |
| 67364 | function literalTypesWithSameBaseType(types) { |
| 67365 | var commonBaseType; |
| 67366 | for (var _i = 0, types_13 = types; _i < types_13.length; _i++) { |
| 67367 | var t = types_13[_i]; |
| 67368 | var baseType = getBaseTypeOfLiteralType(t); |
| 67369 | if (!commonBaseType) { |
| 67370 | commonBaseType = baseType; |
| 67371 | } |
| 67372 | if (baseType === t || baseType !== commonBaseType) { |
| 67373 | return false; |
| 67374 | } |
| 67375 | } |
| 67376 | return true; |
| 67377 | } |
| 67378 | // When the candidate types are all literal types with the same base type, return a union |
| 67379 | // of those literal types. Otherwise, return the leftmost type for which no type to the |
| 67380 | // right is a supertype. |
no test coverage detected