import { ActionType } from '../RendererTypes' ; import { Dispatch } from 'redux' ; returns export const requestOpenItem = ( ) => ( { type : ActionType . RequestOpenItem } ) ; returns export const openItem = ( itemPath ) => async ( dispatch ) => { dispatch ( requestOpenItem ( ) ) ; await window . myAPI . openItem ( itemPath ) ; } ;