Function extractProperty

  • Sometimes, all you're looking to do is extract a single property from and object. That's what this function does

    Type Parameters

    • O extends object

    Parameters

    • key: keyof O

    Returns ((o) => O[keyof O])

      • (o): O[keyof O]
      • Parameters

        Returns O[keyof O]