Skip to main content

CommonFromEntries

Callable

  • CommonFromEntries<KT, VT>(iterable: Iterable<[key: KT, value: VT]>): Record<KT, VT>

  • A Object.fromEntries variant annotated to return respect literal key types.

    @note

    The returned record is typed as being non-Partial, an assumption that may not hold in practice


    Type parameters

    • KT: string
    • VT

    Parameters

    • iterable: Iterable<[key: KT, value: VT]>

      An iterable object that contains key-value entries for properties and methods

    Returns Record<KT, VT>

    A record created from the passed key/value pairs