import { Action } from "redux" ; import { Session } from "common" ; /**
 * Session action types
 */ export enum SessionActionTypes { INIT = "SESSION_INIT" , TERMINATE = "SESSION_TERMINATE" } /**
 * Session init action
 */ interface SessionInitAction extends Action { type : SessionActionTypes . INIT ; session : Session < string > ; } /**
 * Session terminate action
 */ interface SessionTerminateAction extends Action { type : SessionActionTypes . TERMINATE ; } /**
 * Session actions
 */ export type SessionActions = SessionInitAction | SessionTerminateAction ; param session return export const initSessionAction = ( session ) : SessionInitAction => ( { type : SessionActionTypes . INIT , session } ) ; return export const terminateSessionAction = ( ) : SessionTerminateAction => ( { type : SessionActionTypes . TERMINATE } ) ;