Skip to content

flatten declaration typings #1712

Open
Open
@eggers

Description

@eggers

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>;

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions