import { ICommand } from 'valor-unistore-undo'; import { IStoreState } from '../index.data'; import { recalculate } from '../store/actions/recalculate'; import * as R from 'rambda'; import { SpreadSheetRuntime } from '../RuntimeContext'; class RecalculateCommand extends ICommand { execute = () => { const patchState = recalculate(this.store.getState(), { force: true, config: this.runtime!.formulaManager.config, }); this.store.setState(patchState); return true; }; undo = () => {}; } export default RecalculateCommand;