import { HistoryNodeOptionEvent , nodeOptionEvent } from '@/store/history/types' ; import DataReservoir from './data-reservoir' ; enum DataReservoirEventType { RELEASE_OUTPUT = 'setItems' , CLEAR_OUTPUT = 'setItems' } export const releaseOutputEvent = ( node , items , prevItems ) : HistoryNodeOptionEvent => { return nodeOptionEvent ( DataReservoirEventType . RELEASE_OUTPUT , 'release output' , node , node . setItems , items . concat ( ) , prevItems . concat ( ) ) ; } ; export const clearOutputEvent = ( node , prevItems ) : HistoryNodeOptionEvent => { return nodeOptionEvent ( DataReservoirEventType . CLEAR_OUTPUT , 'clear output' , node , node . setItems , [ ] , prevItems . concat ( ) ) ; } ;