{ type ToArray < T > = T extends any ? T [ ] : never ; type Tmp = ToArray < string | number > ; type TmpB = ToArray < ( string | number ) > ; } { type ToArray < T > = [ T ] extends any ? T [ ] : never ; type Tmp = ToArray < string | number > ; } { type Foo < T > = T extends any ? T : never ; type Tmp = Foo < string | number | never > ; } { type ToArray < T > = [ T ] extends [ any ] ? T [ ] : never ; type Tmp = ToArray < string | number > ; } { const array = [ 1 ] ; }