// ここではそれぞれの型引数(T,U)はお互いの関係性は知らない
function someFunction <T, U> (t: T, u: U): T {
return t;
}
const dog = someFunction(new Dog(), new Cat());
// これを `T extends U` とすることで第二引数のU型を制約とするTになった
function someFunction <T extends U, U> (t: T, u: U): T {
return t;
}
これをF-bounded polymorphismという
https://stackoverflow.com/questions/39176786/what-is-f-bounded-polymorphism-in-typescript