Interface MapConstructor

    interface MapConstructor {
        new MapConstructor(): Map<any, any>;
        new MapConstructor<K, V>(entries?: readonly (readonly [K, V])[]): Map<K, V>;
        new MapConstructor(): Map<any, any>;
        new MapConstructor<K, V>(iterable?: Iterable<readonly [K, V]>): Map<K, V>;
        "[species]": MapConstructor;
        prototype: Map<any, any>;
        groupBy<K, T>(
            items: Iterable<T>,
            keySelector: (item: T, index: number) => K,
        ): Map<K, T[]>;
    }

    Constructors

    Properties

    Methods

    Constructors

    • Returns Map<any, any>

    • Type Parameters

      • K
      • V

      Parameters

      • Optionalentries: readonly (readonly [K, V])[]

      Returns Map<K, V>

    • Returns Map<any, any>

    • Type Parameters

      • K
      • V

      Parameters

      Returns Map<K, V>

    Properties

    "[species]": MapConstructor
    prototype: Map<any, any>

    Methods

    • Groups members of an iterable according to the return value of the passed callback.

      Type Parameters

      • K
      • T

      Parameters

      • items: Iterable<T>

        An iterable.

      • keySelector: (item: T, index: number) => K

        A callback which will be invoked for each item in items.

      Returns Map<K, T[]>