(t *Type, tp *Type, depth int)
| 1457 | } |
| 1458 | |
| 1459 | func (c *Checker) isTypeParameterAtTopLevel(t *Type, tp *Type, depth int) bool { |
| 1460 | return t == tp || |
| 1461 | t.flags&TypeFlagsUnionOrIntersection != 0 && core.Some(t.Types(), func(t *Type) bool { return c.isTypeParameterAtTopLevel(t, tp, depth) }) || |
| 1462 | depth < 3 && t.flags&TypeFlagsConditional != 0 && |
| 1463 | (c.isTypeParameterAtTopLevel(c.getTrueTypeFromConditionalType(t), tp, depth+1) || |
| 1464 | c.isTypeParameterAtTopLevel(c.getFalseTypeFromConditionalType(t), tp, depth+1)) |
| 1465 | } |
| 1466 | |
| 1467 | func (c *Checker) isTypeParameterAtTopLevelInReturnType(signature *Signature, typeParameter *Type) bool { |
| 1468 | typePredicate := c.getTypePredicateOfSignature(signature) |
no test coverage detected