In the test cases... the last test... there is a comment on what doesn't work.
It doesn't show an error (everything compiles), but it doesn't match the _ChainOfArrays line, it falls back to the _Chain line and the flatten function returns any instead of the correct type.
I would think they should behave identically, so this might be a TypeScript issue?