(type)
| 57270 | } |
| 57271 | // A valid base type is `any`, an object type or intersection of object types. |
| 57272 | function isValidBaseType(type) { |
| 57273 | if (type.flags & 262144 /* TypeFlags.TypeParameter */) { |
| 57274 | var constraint = getBaseConstraintOfType(type); |
| 57275 | if (constraint) { |
| 57276 | return isValidBaseType(constraint); |
| 57277 | } |
| 57278 | } |
| 57279 | // TODO: Given that we allow type parmeters here now, is this `!isGenericMappedType(type)` check really needed? |
| 57280 | // There's no reason a `T` should be allowed while a `Readonly<T>` should not. |
| 57281 | return !!(type.flags & (524288 /* TypeFlags.Object */ | 67108864 /* TypeFlags.NonPrimitive */ | 1 /* TypeFlags.Any */) && !isGenericMappedType(type) || |
| 57282 | type.flags & 2097152 /* TypeFlags.Intersection */ && ts.every(type.types, isValidBaseType)); |
| 57283 | } |
| 57284 | function resolveBaseTypesOfInterface(type) { |
| 57285 | type.resolvedBaseTypes = type.resolvedBaseTypes || ts.emptyArray; |
| 57286 | if (type.symbol.declarations) { |
no test coverage detected
searching dependent graphs…