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

    Function pick

    • Returns an object with a selection of properties

      Type Parameters

      • T extends object

        Type of the supplied object

      • K extends string

        Type of the property keys to return

      Parameters

      • obj: T

        Object to pick properties out of

      • keys: readonly K[]

        Names of the properties to pick

      Returns DistributedPick<T, K>

      Resulting object

    • Returns an array with a selection of properties

      Type Parameters

      • T extends object

        Type of the supplied array

      • K extends string

        Type of the property keys to return

      Parameters

      • arr: T[]
      • keys: readonly K[]

        Names of the properties to pick

      Returns DistributedPick<T, K>[]

      Resulting array