UNPKG

react-redux-isomorphic

Version:

Set of utilities for creating isomorphic applications using react-redux

40 lines (39 loc) 1.64 kB
import { LOAD_CONTEXT, RELOAD_CONTEXT, LOAD_CONTEXT_SUCCESS, LOAD_CONTEXT_ERROR, DESTROY } from './actionsTypes'; export declare type LoadContextAction = { type: typeof LOAD_CONTEXT; payload: { isomorphicId: string; }; }; export declare const loadContext: (isomorphicId: string) => LoadContextAction; export declare type ReloadContextAction = { type: typeof RELOAD_CONTEXT; payload: { isomorphicId: string; }; }; export declare const reloadContext: (isomorphicId: string) => ReloadContextAction; export declare type LoadContextSuccessAction<IsomorphicContext> = { type: typeof LOAD_CONTEXT_SUCCESS; payload: { isomorphicId: string; context: IsomorphicContext; }; }; export declare const loadContextSuccess: <IsomorphicContext>(isomorphicId: string, context: IsomorphicContext) => LoadContextSuccessAction<IsomorphicContext>; export declare type LoadContextErrorAction<IsomorphicError> = { type: typeof LOAD_CONTEXT_ERROR; payload: { isomorphicId: string; error: IsomorphicError; }; }; export declare const loadContextError: <IsomorphicError>(isomorphicId: string, error: IsomorphicError) => LoadContextErrorAction<IsomorphicError>; export declare type DestroyAction = { type: typeof DESTROY; payload: { isomorphicId: string; }; }; export declare const destroy: (isomorphicId: string) => DestroyAction; export declare type IsomorphicAction<IsomorphicContext, IsomorphicError> = LoadContextAction | ReloadContextAction | LoadContextSuccessAction<IsomorphicContext> | LoadContextErrorAction<IsomorphicError> | DestroyAction;