Change

constructor(currentState: S, nextState: S)