Function pick

  • Pragmatic version of Typescripts `Pick<Object, Fields>

    Returns

    An object with the picked fields.

    Type Parameters

    • T extends {}

    • K extends (keyof T)[]

    • P extends string | number | symbol

    Parameters

    • object: T

      The Object to pick fields from.

    • fields: K

      An array of fields to pick,

    Returns Pick<T, P>

Generated using TypeDoc