// @flow

declare module 'redux-actions' {
  declare function createAction<Type: string, Payload>(
    type: Type
  ): (payload: Payload) => {type: Type, payload: Payload}

  declare function handleActions(
    reducerMap: {[key: string]: (state: any, action: {type: string, payload: mixed}) => mixed},
    defaultState?: mixed
  ): Function

  declare module.exports: {
    createAction: typeof createAction,
    handleActions: typeof handleActions
  }
}

// @flow

declare module 'redux-actions' {
  declare function createAction<Type: string, Payload>(
    type: Type
  ): (payload: Payload) => {type: Type, payload: Payload}

  declare function handleActions<State>(
    reducerMap: {[key: string]: (state: State, action: any) => State},
    defaultState: State
  ): (state: State, action: any) => State

  declare module.exports: {
    createAction: typeof createAction,
    handleActions: typeof handleActions
  }
}

Update type definitions for redux-actions