true
if T
is assignable to U
, false
otherwise.
type A = { x: number };
type B = { x: number; y: string };
type C = { x: number; y?: string };
type Check1 = Extends<A, B>; // false, A does not extend B
type Check2 = Extends<B, A>; // true, B extends A
type Check3 = Extends<C, B>; // true, C extends B
Evaluates whether one type
T
is assignable to another typeU
.