Creates new object with only specified keys

  • Type Parameters

    • T extends Record<string, any>

    Parameters

    • ks: string[]

      Keys to keep

    • x: T

      Source object

    Returns T

    New object with only specified keys