* This is *not* a bi-directional relationship. * If one needs to check both directions for comparability, use a second call to this function or 'checkTypeComparableTo'. * * A type S is comparable to a type T if some (but not necessarily all) of the possible values of S are
(source, target)
| 63869 | * - the type of an expression in a type assertion with the type being asserted. |
| 63870 | */ |
| 63871 | function isTypeComparableTo(source, target) { |
| 63872 | return isTypeRelatedTo(source, target, comparableRelation); |
| 63873 | } |
| 63874 | function areTypesComparable(type1, type2) { |
| 63875 | return isTypeComparableTo(type1, type2) || isTypeComparableTo(type2, type1); |
| 63876 | } |
no test coverage detected