// Type definitions for redux-actions v0.8.0 // Project: https://github.com/acdlite/redux-actions // Definitions by: Jack Hsu // Definitions: https://github.com/borisyankov/DefinitelyTyped declare module ReduxActions { // FSA-compliant action. // See: https://github.com/acdlite/flux-standard-action type Action = { type: string payload?: any error?: boolean meta?: any }; type PayloadCreator = (...args: any[]) => T; type MetaCreator = (...args: any[]) => any; type Reducer = (state: T, action: Action) => T; type ReducerMap = { [actionType: string]: Reducer }; export function createAction(actionType: string, payloadCreator?: PayloadCreator, metaCreator?: MetaCreator): (...args: any[]) => Action; export function handleAction(actionType: string, reducer: Reducer | ReducerMap): Reducer; export function handleActions(reducerMap: ReducerMap, initialState?: T): Reducer; } declare module 'redux-actions' { export = ReduxActions; }