• Creates a Collection.Keyed

    Similar to Collection(), however it expects collection-likes of [K, V] tuples if not constructed from a Collection.Keyed or JS Object.

    Note: Collection.Keyed is a conversion function and not a class, and does not use the new keyword during construction.

    Type Parameters

    • K
    • V

    Parameters

    • Optionalcollection: Iterable<[K, V], any, any>

    Returns Collection.Keyed<K, V>

  • Creates a Collection.Keyed

    Similar to Collection(), however it expects collection-likes of [K, V] tuples if not constructed from a Collection.Keyed or JS Object.

    Note: Collection.Keyed is a conversion function and not a class, and does not use the new keyword during construction.

    Type Parameters

    • V

    Parameters

    • obj: { [key: string]: V }

    Returns Collection.Keyed<string, V>