**Code** ```ts const x = [1, [[2]]]; const y: never = x.flat(); ``` **Expected behavior:** I expect the following error: ``` Type '(1 | [2])[]' is not assignable to type 'never'. ``` or with more general types, ``` Type '(number | number[])[]' is not assignable to type 'never'. ``` This should actually be pretty easy to implement by simply unwrapping the array type (see link below). **Actual behavior:** I instead see ``` Type 'any[]' is not assignable to type 'never'. ``` **Playground Link:** [Using the current definitions][1] [What I expect should happen][2] [1]: https://www.typescriptlang.org/play/#src=%2F%2F%20NOTE%3A%20copied%20from%20https%3A%2F%2Fgithub.com%2FMicrosoft%2FTypeScript%2Fblob%2Fmaster%2Flib%2Flib.esnext.array.d.ts%0D%0Ainterface%20Array%3CT%3E%20%7B%0D%0A%20%20%20%20flatMap%3CU%2C%20This%20%3D%20undefined%3E%20(%0D%0A%20%20%20%20%20%20%20%20callback%3A%20(this%3A%20This%2C%20value%3A%20T%2C%20index%3A%20number%2C%20array%3A%20T%5B%5D)%20%3D%3E%20U%7CReadonlyArray%3CU%3E%2C%0D%0A%20%20%20%20%20%20%20%20thisArg%3F%3A%20This%0D%0A%20%20%20%20)%3A%20U%5B%5D%0D%0A%20%20%20%20flat%3CU%3E(this%3A%20U%5B%5D%5B%5D%5B%5D%5B%5D%5B%5D%5B%5D%5B%5D%5B%5D%2C%20depth%3A%207)%3A%20U%5B%5D%3B%0D%0A%20%20%20%20flat%3CU%3E(this%3A%20U%5B%5D%5B%5D%5B%5D%5B%5D%5B%5D%5B%5D%5B%5D%2C%20depth%3A%206)%3A%20U%5B%5D%3B%0D%0A%20%20%20%20flat%3CU%3E(this%3A%20U%5B%5D%5B%5D%5B%5D%5B%5D%5B%5D%5B%5D%2C%20depth%3A%205)%3A%20U%5B%5D%3B%0D%0A%20%20%20%20flat%3CU%3E(this%3A%20U%5B%5D%5B%5D%5B%5D%5B%5D%5B%5D%2C%20depth%3A%204)%3A%20U%5B%5D%3B%0D%0A%20%20%20%20flat%3CU%3E(this%3A%20U%5B%5D%5B%5D%5B%5D%5B%5D%2C%20depth%3A%203)%3A%20U%5B%5D%3B%0D%0A%20%20%20%20flat%3CU%3E(this%3A%20U%5B%5D%5B%5D%5B%5D%2C%20depth%3A%202)%3A%20U%5B%5D%3B%0D%0A%20%20%20%20flat%3CU%3E(this%3A%20U%5B%5D%5B%5D%2C%20depth%3F%3A%201)%3A%20U%5B%5D%3B%0D%0A%20%20%20%20flat%3CU%3E(this%3A%20U%5B%5D%2C%20depth%3A%200)%3A%20U%5B%5D%3B%0D%0A%20%20%20%20flat%3CU%3E(depth%3F%3A%20number)%3A%20any%5B%5D%3B%0D%0A%7D%0D%0A%0D%0Aconst%20x%20%3D%20%5B1%2C%20%5B%5B2%5D%5D%5D%3B%0D%0Aconst%20y%3A%20never%20%3D%20x.flat()%3B [2]: http://www.typescriptlang.org/play/#src=type%20Elem%3CX%3E%20%3D%20X%20extends%20(infer%20Y)%5B%5D%20%3F%20Y%20%3A%20X%3B%0D%0A%0D%0Ainterface%20Array%3CT%3E%20%7B%0D%0A%20%20%20%20flat(depth%3A%207)%3A%20Elem%3CElem%3CElem%3CElem%3CElem%3CElem%3CElem%3CElem%3Cthis%3E%3E%3E%3E%3E%3E%3E%3E%5B%5D%3B%0D%0A%20%20%20%20flat(depth%3A%206)%3A%20Elem%3CElem%3CElem%3CElem%3CElem%3CElem%3CElem%3Cthis%3E%3E%3E%3E%3E%3E%3E%5B%5D%3B%0D%0A%20%20%20%20flat(depth%3A%205)%3A%20Elem%3CElem%3CElem%3CElem%3CElem%3CElem%3Cthis%3E%3E%3E%3E%3E%3E%5B%5D%3B%0D%0A%20%20%20%20flat(depth%3A%204)%3A%20Elem%3CElem%3CElem%3CElem%3CElem%3Cthis%3E%3E%3E%3E%3E%5B%5D%3B%0D%0A%20%20%20%20flat(depth%3A%203)%3A%20Elem%3CElem%3CElem%3CElem%3Cthis%3E%3E%3E%3E%5B%5D%3B%0D%0A%20%20%20%20flat(depth%3A%202)%3A%20Elem%3CElem%3CElem%3Cthis%3E%3E%3E%5B%5D%3B%0D%0A%20%20%20%20flat(depth%3F%3A%201)%3A%20Elem%3CElem%3Cthis%3E%3E%5B%5D%3B%0D%0A%20%20%20%20flat(depth%3A%200)%3A%20Elem%3Cthis%3E%5B%5D%3B%0D%0A%20%20%20%20flat(depth%3F%3A%20number)%3A%20any%5B%5D%3B%0D%0A%7D%0D%0A%0D%0Alet%20x%3A%20%5B1%2C%20%5B%5B2%5D%5D%5D%3B%0D%0Alet%20y%3A%20never%20%3D%20x.flat()%3B **Related Issues:** None found.