The old code was returning a fn because TypeScript could not figure out
generic type parameters when params was an object like:
interface Params<State> {
a: Reducer<State>
b: Partial<State>
}
function test<State>(params: Params<State>) {
// ...
}