declare class Container<T> {
filter<U extends T>(predicate: (x: T) => x is U): Container<U>;
}
interface Animal {
a
}
interface Dog extends Animal {
d
}
declare function isDog(x: Animal): boolean;
new Container<Animal>().filter(isDog);
// ~~~~~
Expected: Signature '(x: Animal): boolean' must be a type predicate.
Actual: Signature '(x: Animal): boolean' must have a type predicate.
Expected: Signature '(x: Animal): boolean' must be a type predicate.
Actual: Signature '(x: Animal): boolean' must have a type predicate.