@jossmac/lil-libs
    Preparing search index...

    Function typedEntries

    • Typed alternative to Object.entries() that preserves key/value tuples.

      • T extends object
      • value: T

        Object whose own enumerable entries to collect.

      [key, value] tuples with preserved keyof/value types instead of [string, any][].

      const obj = { foo: 1, bar: "hello" };
      const entries = typedEntries(obj);
      // ^? (["foo", number] | ["bar", string])[]