clear(state) {
        this.history = [state];
        this.index = 0;
        this.isWorkingOnCommit = false;
        this._changes.send(state);
        this._latestActiveCommit.set(state);
    }
Throws away all revisions and resets the given state.
@param {*} state
@returns {void}