import * as api from "../api" ; export const logInit = ( payload ) => ( state ) : Partial < api . State > => { const { runId , interop , timestamp } = payload ; const runs = state . runs . concat ( runId ) ; const runsById = { ... state . runsById } ; const initEvent = { id : runId , type : "init" , name : "Initial State" , state : payload . state } ; runsById [ runId ] = { id : runId , events : [ runId ] , eventsById : { [ runId ] : initEvent } , currentState : payload . state , timestamp , interop , collapsed : false } ; return { runs , runsById , selectedEvent : { runId , eventId : runId } } ; } ;