I want to create a generic function that takes an NgRx action and a method as input.
The first argument of the method should infer the type of the action payload. Here is