• Create a new object with a subset of fields from a source object.

    Type Parameters

    • T
    • K extends string | number | symbol

    Parameters

    • source: T

      Object to pick fields from.

    • Rest...keys: K[]

      Names of fields to pick.

    Returns Pick<T, K>

    New object with only the picked fields.