Hex Core JS
    Preparing search index...

    Function pickKeys

    • Returns a subset of the given object containing only the keys specified. A functional implementation of the Pick utility type. For the inverse operation, see omitKeys.

      Type Parameters

      Parameters

      • object: T

        The object to filter.

      • keys: K[]

        An array of keys to pick from the object.

      Returns Pick<T, K>

    • Returns a subset of the given object containing only the keys specified. A functional implementation of the Pick utility type. Works on subsets (Pick) of a type T and accepts all keys of the full type T. For the inverse operation, see omitKeys.

      Type Parameters

      • T extends GenericObject
      • SK extends string | number | symbol
      • K extends string | number | symbol

      Parameters

      • object: Pick<T, SK>

        The object to filter.

      • keys: K[]

        An array of keys to pick from the object.

      Returns Pick<T, SK & K>

    • Returns a subset of the given object containing only the keys specified. A functional implementation of the Pick utility type. Works on partial subsets (Partial<Pick>) of a type T and accepts all keys of the full type T. For the inverse operation, see omitKeys.

      Type Parameters

      • T extends GenericObject
      • SK extends string | number | symbol
      • K extends string | number | symbol

      Parameters

      • object: Partial<Pick<T, SK>>

        The object to filter.

      • keys: K[]

        An array of keys to pick from the object.

      Returns Partial<Pick<T, SK & K>>