Open
Description
The TypeScript declarations for flatten say:
Note: `flatten(true)` operates on Collection<any, Collection<K, V>> and
returns Collection<K, V>
Would it make sense to add another typing like this:
flatten(true): V;
or maybe some additional generics on it like this:
flatten<K2 = any, V2 = any>(shallow?: boolean): Collection<K2, V2>;