import { UserState , SET_USER_STATE , RESET_USER_STATE } from './type' ; type ISetUserState = IAction < typeof SET_USER_STATE , Partial < UserState > > ; type IResetUserState = IAction < typeof RESET_USER_STATE > ; export const setUserState = ( payload ) : ISetUserState => { return { type : SET_USER_STATE , payload : payload } ; } ; export const resetUserState = ( ) : IResetUserState => { return { type : RESET_USER_STATE , payload : null } ; } ; export type UserAction = ISetUserState | IResetUserState ;