(type, checkBase)
| 56933 | } |
| 56934 | // TODO: GH#18217 If `checkBase` is undefined, we should not call this because this will always return false. |
| 56935 | function hasBaseType(type, checkBase) { |
| 56936 | return check(type); |
| 56937 | function check(type) { |
| 56938 | if (ts.getObjectFlags(type) & (3 /* ObjectFlags.ClassOrInterface */ | 4 /* ObjectFlags.Reference */)) { |
| 56939 | var target = getTargetType(type); |
| 56940 | return target === checkBase || ts.some(getBaseTypes(target), check); |
| 56941 | } |
| 56942 | else if (type.flags & 2097152 /* TypeFlags.Intersection */) { |
| 56943 | return ts.some(type.types, check); |
| 56944 | } |
| 56945 | return false; |
| 56946 | } |
| 56947 | } |
| 56948 | // Appends the type parameters given by a list of declarations to a set of type parameters and returns the resulting set. |
| 56949 | // The function allocates a new array if the input type parameter set is undefined, but otherwise it modifies the set |
| 56950 | // in-place and returns the same array. |
no test coverage detected
searching dependent graphs…