- setState: function (createTimestamp: string, state: string) {
- return log.recordAndApply(`${Date.now()} State ${createTimestamp} ${state}`);
+ setState: function (createTimestamp: string, newState: string, oldState: string) {
+ undoLog.push(`State ${createTimestamp} ${oldState}`);
+ return log.recordAndApply(`${Date.now()} State ${createTimestamp} ${newState}`);