Open
Description
TypeScript Version: 2.5.2
Code
interface ITypeChecker
{
isOfType<T extends TBase, TBase>(obj: TBase): obj is T;
}
class Checker implements ITypeChecker
{
isOfType<T extends TBase, TBase>(obj: TBase): obj is T
{
return true;
}
}
Expected behavior:
Class Checker should be treated as a valid implementation (used to be in Ts-2.3).
Actual behavior:
Compiler complains:
- interface-not-properly-implemented
(...)- Type predicate 'value is TBase' is not assignable to 'value is T'
- Type 'TBase' is not assignable to type 'T'
- Type predicate 'value is TBase' is not assignable to 'value is T'