@alextheman/utility - v5.34.0
    Preparing search index...

    Function pickProperties

    • Picks properties from a given object.

      Type Parameters

      • ObjectType extends object

        The type of the input object.

      • KeysToPick extends string | number | symbol

        A type representing the keys to pick from the object.

      Parameters

      • object: ObjectType

        The object to pick properties from.

      • keysToPick: KeysToPick | readonly KeysToPick[]

        The keys to pick from the object. Can either be a single string to pick one, or an array to pick multiple.

      Returns Pick<ObjectType, KeysToPick>

      An object with a new reference in memory, with the chosen properties present.