(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) { |
| 57287 | for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) { |
| 57288 | var declaration = _a[_i]; |
| 57289 | if (declaration.kind === 258 /* SyntaxKind.InterfaceDeclaration */ && ts.getInterfaceBaseTypeNodes(declaration)) { |
| 57290 | for (var _b = 0, _c = ts.getInterfaceBaseTypeNodes(declaration); _b < _c.length; _b++) { |
| 57291 | var node = _c[_b]; |
| 57292 | var baseType = getReducedType(getTypeFromTypeNode(node)); |
| 57293 | if (!isErrorType(baseType)) { |
| 57294 | if (isValidBaseType(baseType)) { |
| 57295 | if (type !== baseType && !hasBaseType(baseType, type)) { |
| 57296 | if (type.resolvedBaseTypes === ts.emptyArray) { |
| 57297 | type.resolvedBaseTypes = [baseType]; |
| 57298 | } |
| 57299 | else { |
| 57300 | type.resolvedBaseTypes.push(baseType); |
| 57301 | } |
| 57302 | } |
| 57303 | else { |
| 57304 | reportCircularBaseType(declaration, type); |
| 57305 | } |
| 57306 | } |
| 57307 | else { |
| 57308 | error(node, ts.Diagnostics.An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members); |
| 57309 | } |
| 57310 | } |
| 57311 | } |
| 57312 | } |
| 57313 | } |
| 57314 | } |
| 57315 | } |
| 57316 | /** |
| 57317 | * Returns true if the interface given by the symbol is free of "this" references. |
| 57318 | * |
no test coverage detected
searching dependent graphs…