import _ from 'lodash' ; import { Action } from 'redux' ; param type param payload return export function createAction < T extends string > ( type ) ; export function createAction < T extends string , P > ( type , payload ) ; export function createAction < T extends string , P > ( type , payload ? ) { return _ . isNil ( payload ) ? { type } : { type , payload } ; } prop prop prop prop export type RehydrateAction = { type : 'persist/REHYDRATE' ; key : string ; payload ? : any ; err ? : any ; } ; prop interface AnyAction < T extends string , P > extends Action < T > { payload : P ; }