typedFromEntries | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...

    Function typedFromEntries

    • Returns an object from an iterable of [key, value] pairs, with exact types. Exists because Object.fromEntries doesn't take the type of the keys and values into account.

      Type Parameters

      • T extends [string, unknown]

      Parameters

      • entries: Iterable<T>

        Iterable of [key, value] pairs

      Returns TypedFromEntries<T>

      An object with the same keys and values as the input