Skip to content

Add generics to new Map.fromIterable() #26392

Closed
@nex3

Description

@nex3

Currently, new Map.fromIterable() is very difficult to use in strong mode, because it doesn't support type propagation from the Iterable argument to the callbacks:

Map.fromIterable(Iterable elements, {K key(element), V value(element)});

We should fix this, either using #26391 to make the constructor generic, or by making it a static method instead of a constructor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.core-llibrary-coretype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions