が2 のとき 完成形 type Includes<T extends any[], U> = T extends [infer H, ...infer R] ? Equal<H, U> extends true ? true : Includes<R, U> : false; ` ` ` ` ` ` Includes<[1, 2, 3], 2> => [1, 2, 3] extends [infer H /* 1 */, ...infer R /* [2, 3] */] ? Equal<1, 2> extends true ? true : Includes<[2, 3], 2> : false; => Includes<[2, 3], 2> => [2, 3] extends [infer H /* 2 */, ...infer R /* [3] */] ? Equal<2, 2> extends true ? true : Includes<[3], 2> : false; => true