UNPKG

template-ivan

Version:
23 lines (17 loc) 554 B
// @flow import type { DispatchAPI } from 'redux' import type { GetData } from './welcome' import type { HttpMiddleware } from './httpmiddleware' import type { Thunk } from './thunk' // actions存在的原因: // encapsulate behavior, // separate concerns, // keep code duplication to a minimum, // keep our code as testable as possible. // global Actions, Disjoint Unions of every action export type Actions = | HttpMiddleware | GetData | Thunk // global Dispatch, attentions to middleware actions export type Dispatch = DispatchAPI<Actions>