import { Dispatch } from 'redux' ; import { ActionType } from '../Types' ; export const finishGetWindowIds = ( windowIds ) => ( { type : ActionType . GetWindowIds as ActionType . GetWindowIds , payload : { windowIds } } ) ; export const getWindowIds = ( ) => async ( dispatch ) => { const windowIds = await window . myAPI . getWindowIds ( ) ; dispatch ( finishGetWindowIds ( windowIds ) ) ; } ;