Closed
Description
interface Base { b }
interface Derived extends Base { d }
declare function isDerived(x: Base): x is Derived;
function f<T extends Base>(x: T, y: T) {
if (isDerived(x) && isDerived(y)) {
return x.d === y.d;
}
return false;
}
Currently, this errors because both x
and y
still have type T
, so they are missing the d
property.