Code QuizAdvanced

Recursive Type That Never Terminates

A recursive conditional type must recurse on the inner type extracted by infer, not the original.

Codetypescript
type Flatten<T> = T extends Array<infer U>
  ? Flatten<T>
  : T;

type A = Flatten<number[][]>; // want number

What is the bug in this code?