@eroyeroy/utils - v0.1.0
    Preparing search index...

    Function objectKeys

    • Typed wrapper around Object.keys that preserves the key type.

      Type Parameters

      • T extends object

      Parameters

      • obj: T

        The source object.

      Returns (keyof T)[]

      objectKeys({ a: 1, b: 2 }) // => ["a", "b"] (typed as ("a" | "b")[])