• Partitions an object by keys into two separate objects: one containing the picked keys and their corresponding values, and another containing the remaining keys and their corresponding values.

    Type Parameters

    • T extends object

      The type of the object to be partitioned.

    • TKeys extends readonly (keyof ExcludeMethods<T>)[]

      The type of the keys to be picked.

    Parameters

    • obj: T

      The object to be partitioned.

    • keys: TKeys

      The keys to be picked.

    Returns [Pick<T, typeof keys[number]>, Omit<T, typeof keys[number] | GetMethodKeys<T>>]

    An array containing two objects: the first object contains the picked keys and their corresponding values, and the second object contains the remaining keys and their corresponding values.

Generated using TypeDoc