(source, target)
| 63851 | // Note that this check ignores type parameters and only considers the |
| 63852 | // inheritance hierarchy. |
| 63853 | function isTypeDerivedFrom(source, target) { |
| 63854 | return source.flags & 1048576 /* TypeFlags.Union */ ? ts.every(source.types, function (t) { return isTypeDerivedFrom(t, target); }) : |
| 63855 | target.flags & 1048576 /* TypeFlags.Union */ ? ts.some(target.types, function (t) { return isTypeDerivedFrom(source, t); }) : |
| 63856 | source.flags & 58982400 /* TypeFlags.InstantiableNonPrimitive */ ? isTypeDerivedFrom(getBaseConstraintOfType(source) || unknownType, target) : |
| 63857 | target === globalObjectType ? !!(source.flags & (524288 /* TypeFlags.Object */ | 67108864 /* TypeFlags.NonPrimitive */)) : |
| 63858 | target === globalFunctionType ? !!(source.flags & 524288 /* TypeFlags.Object */) && isFunctionObjectType(source) : |
| 63859 | hasBaseType(source, getTargetType(target)) || (isArrayType(target) && !isReadonlyArrayType(target) && isTypeDerivedFrom(source, globalReadonlyArrayType)); |
| 63860 | } |
| 63861 | /** |
| 63862 | * This is *not* a bi-directional relationship. |
| 63863 | * If one needs to check both directions for comparability, use a second call to this function or 'checkTypeComparableTo'. |
no test coverage detected
searching dependent graphs…