@types/redux-actions
Advanced tools
+85
-88
@@ -6,113 +6,110 @@ // Type definitions for redux-actions 1.2 | ||
| export = ReduxActions; | ||
| export as namespace ReduxActions; | ||
| declare namespace ReduxActions { | ||
| // FSA-compliant action. | ||
| // See: https://github.com/acdlite/flux-standard-action | ||
| interface BaseAction { | ||
| type: string; | ||
| } | ||
| // FSA-compliant action. | ||
| // See: https://github.com/acdlite/flux-standard-action | ||
| interface BaseAction { | ||
| type: string; | ||
| } | ||
| export interface Action<Payload> extends BaseAction { | ||
| payload?: Payload; | ||
| error?: boolean; | ||
| } | ||
| interface Action<Payload> extends BaseAction { | ||
| payload?: Payload; | ||
| error?: boolean; | ||
| } | ||
| export interface ActionMeta<Payload, Meta> extends Action<Payload> { | ||
| meta: Meta; | ||
| } | ||
| interface ActionMeta<Payload, Meta> extends Action<Payload> { | ||
| meta: Meta; | ||
| } | ||
| interface ReducerMap<State, Payload> { | ||
| [actionType: string]: Reducer<State, Payload> | ReducerNextThrow<State, Payload>; | ||
| } | ||
| interface ReducerMap<State, Payload> { | ||
| [actionType: string]: Reducer<State, Payload> | ReducerNextThrow<State, Payload>; | ||
| } | ||
| interface ReducerMapMeta<State, Payload, Meta> { | ||
| [actionType: string]: Reducer<State, Payload> | ReducerNextThrow<State, Payload>; | ||
| } | ||
| interface ReducerMapMeta<State, Payload, Meta> { | ||
| [actionType: string]: Reducer<State, Payload> | ReducerNextThrow<State, Payload>; | ||
| } | ||
| interface ReducerNextThrow<State, Payload> { | ||
| next?(state: State, action: Action<Payload>): State; | ||
| throw?(state: State, action: Action<Payload>): State; | ||
| } | ||
| interface ReducerNextThrow<State, Payload> { | ||
| next?(state: State, action: Action<Payload>): State; | ||
| throw?(state: State, action: Action<Payload>): State; | ||
| } | ||
| interface ReducerNextThrowMeta<State, Payload, Meta> { | ||
| next?(state: State, action: ActionMeta<Payload, Meta>): State; | ||
| throw?(state: State, action: ActionMeta<Payload, Meta>): State; | ||
| } | ||
| interface ReducerNextThrowMeta<State, Payload, Meta> { | ||
| next?(state: State, action: ActionMeta<Payload, Meta>): State; | ||
| throw?(state: State, action: ActionMeta<Payload, Meta>): State; | ||
| } | ||
| type ActionFunctions<Payload> = ActionFunction0<Action<Payload>> | ActionFunction1<any, Action<Payload>> | ActionFunction2<any, any, Action<Payload>> | ActionFunction3<any, any, any, Action<Payload>> | ActionFunction4<any, any, any, any, Action<Payload>> | ActionFunctionAny<Action<Payload>>; | ||
| type ActionFunctions<Payload> = ActionFunction0<Action<Payload>> | ActionFunction1<any, Action<Payload>> | ActionFunction2<any, any, Action<Payload>> | ActionFunction3<any, any, any, Action<Payload>> | ActionFunction4<any, any, any, any, Action<Payload>> | ActionFunctionAny<Action<Payload>>; | ||
| type Reducer<State, Payload> = (state: State, action: Action<Payload>) => State; | ||
| type Reducer<State, Payload> = (state: State, action: Action<Payload>) => State; | ||
| type ReducerMeta<State, Payload, Meta> = (state: State, action: ActionMeta<Payload, Meta>) => State; | ||
| type ReducerMeta<State, Payload, Meta> = (state: State, action: ActionMeta<Payload, Meta>) => State; | ||
| /** argument inferring borrowed from lodash definitions */ | ||
| type ActionFunction0<R> = () => R; | ||
| type ActionFunction1<T1, R> = (t1: T1) => R; | ||
| type ActionFunction2<T1, T2, R> = (t1: T1, t2: T2) => R; | ||
| type ActionFunction3<T1, T2, T3, R> = (t1: T1, t2: T2, t3: T3) => R; | ||
| type ActionFunction4<T1, T2, T3, T4, R> = (t1: T1, t2: T2, t3: T3, t4: T4) => R; | ||
| type ActionFunctionAny<R> = (...args: any[]) => R; | ||
| /** argument inferring borrowed from lodash definitions */ | ||
| type ActionFunction0<R> = () => R; | ||
| type ActionFunction1<T1, R> = (t1: T1) => R; | ||
| type ActionFunction2<T1, T2, R> = (t1: T1, t2: T2) => R; | ||
| type ActionFunction3<T1, T2, T3, R> = (t1: T1, t2: T2, t3: T3) => R; | ||
| type ActionFunction4<T1, T2, T3, T4, R> = (t1: T1, t2: T2, t3: T3, t4: T4) => R; | ||
| type ActionFunctionAny<R> = (...args: any[]) => R; | ||
| export function createAction<Payload>( | ||
| actionType: string, | ||
| payloadCreator: ActionFunction0<Payload> | ||
| ): ActionFunction0<Action<Payload>>; | ||
| export function createAction<Payload>( | ||
| actionType: string, | ||
| payloadCreator: ActionFunction0<Payload> | ||
| ): ActionFunction0<Action<Payload>>; | ||
| export function createAction<Payload, Arg1>( | ||
| actionType: string, | ||
| payloadCreator: ActionFunction1<Arg1, Payload> | ||
| ): ActionFunction1<Arg1, Action<Payload>>; | ||
| export function createAction<Payload, Arg1>( | ||
| actionType: string, | ||
| payloadCreator: ActionFunction1<Arg1, Payload> | ||
| ): ActionFunction1<Arg1, Action<Payload>>; | ||
| export function createAction<Payload, Arg1, Arg2>( | ||
| actionType: string, | ||
| payloadCreator: ActionFunction2<Arg1, Arg2, Payload> | ||
| ): ActionFunction2<Arg1, Arg2, Action<Payload>>; | ||
| export function createAction<Payload, Arg1, Arg2>( | ||
| actionType: string, | ||
| payloadCreator: ActionFunction2<Arg1, Arg2, Payload> | ||
| ): ActionFunction2<Arg1, Arg2, Action<Payload>>; | ||
| export function createAction<Payload, Arg1, Arg2, Arg3>( | ||
| actionType: string, | ||
| payloadCreator: ActionFunction3<Arg1, Arg2, Arg3, Payload> | ||
| ): ActionFunction3<Arg1, Arg2, Arg3, Action<Payload>>; | ||
| export function createAction<Payload, Arg1, Arg2, Arg3>( | ||
| actionType: string, | ||
| payloadCreator: ActionFunction3<Arg1, Arg2, Arg3, Payload> | ||
| ): ActionFunction3<Arg1, Arg2, Arg3, Action<Payload>>; | ||
| export function createAction<Payload, Arg1, Arg2, Arg3, Arg4>( | ||
| actionType: string, | ||
| payloadCreator: ActionFunction4<Arg1, Arg2, Arg3, Arg4, Payload> | ||
| ): ActionFunction4<Arg1, Arg2, Arg3, Arg4, Action<Payload>>; | ||
| export function createAction<Payload, Arg1, Arg2, Arg3, Arg4>( | ||
| actionType: string, | ||
| payloadCreator: ActionFunction4<Arg1, Arg2, Arg3, Arg4, Payload> | ||
| ): ActionFunction4<Arg1, Arg2, Arg3, Arg4, Action<Payload>>; | ||
| export function createAction<Payload>( | ||
| actionType: string | ||
| ): ActionFunctionAny<Action<Payload>>; | ||
| export function createAction<Payload>( | ||
| actionType: string | ||
| ): ActionFunctionAny<Action<Payload>>; | ||
| export function createAction<Payload, Meta>( | ||
| actionType: string, | ||
| payloadCreator: (...args: any[]) => Payload, | ||
| metaCreator: (...args: any[]) => Meta | ||
| ): (...args: any[]) => ActionMeta<Payload, Meta>; | ||
| export function createAction<Payload, Meta>( | ||
| actionType: string, | ||
| payloadCreator: (...args: any[]) => Payload, | ||
| metaCreator: (...args: any[]) => Meta | ||
| ): (...args: any[]) => ActionMeta<Payload, Meta>; | ||
| export function handleAction<State, Payload>( | ||
| actionType: string | ActionFunctions<Payload>, | ||
| reducer: Reducer<State, Payload> | ReducerNextThrow<State, Payload>, | ||
| initialState: State | ||
| ): Reducer<State, Payload>; | ||
| export function handleAction<State, Payload>( | ||
| actionType: string | ActionFunctions<Payload>, | ||
| reducer: Reducer<State, Payload> | ReducerNextThrow<State, Payload>, | ||
| initialState: State | ||
| ): Reducer<State, Payload>; | ||
| export function handleAction<State, Payload, Meta>( | ||
| actionType: { toString(): string }, | ||
| reducer: ReducerMeta<State, Payload, Meta> | ReducerNextThrowMeta<State, Payload, Meta>, | ||
| initialState: State | ||
| ): Reducer<State, Payload>; | ||
| export function handleAction<State, Payload, Meta>( | ||
| actionType: { toString(): string }, | ||
| reducer: ReducerMeta<State, Payload, Meta> | ReducerNextThrowMeta<State, Payload, Meta>, | ||
| initialState: State | ||
| ): Reducer<State, Payload>; | ||
| export function handleActions<StateAndPayload>( | ||
| reducerMap: ReducerMap<StateAndPayload, StateAndPayload>, | ||
| initialState: StateAndPayload | ||
| ): Reducer<StateAndPayload, StateAndPayload>; | ||
| export function handleActions<StateAndPayload>( | ||
| reducerMap: ReducerMap<StateAndPayload, StateAndPayload>, | ||
| initialState: StateAndPayload | ||
| ): Reducer<StateAndPayload, StateAndPayload>; | ||
| export function handleActions<State, Payload>( | ||
| reducerMap: ReducerMap<State, Payload>, | ||
| initialState: State | ||
| ): Reducer<State, Payload>; | ||
| export function handleActions<State, Payload>( | ||
| reducerMap: ReducerMap<State, Payload>, | ||
| initialState: State | ||
| ): Reducer<State, Payload>; | ||
| export function combineActions( | ||
| ...actionTypes: Array<ActionFunctions<any>> | ||
| ): Array<ActionFunctions<any>>; | ||
| } | ||
| export function combineActions( | ||
| ...actionTypes: Array<ActionFunctions<any>> | ||
| ): Array<ActionFunctions<any>>; |
| { | ||
| "name": "@types/redux-actions", | ||
| "version": "1.2.1", | ||
| "version": "1.2.2", | ||
| "description": "TypeScript definitions for redux-actions", | ||
@@ -15,4 +15,4 @@ "license": "MIT", | ||
| "peerDependencies": {}, | ||
| "typesPublisherContentHash": "842218e4765848d45aa5d40bd80a41e6ae65155162d7375519bb370426c067b1", | ||
| "typesPublisherContentHash": "b47f36074a11a1e54fd270e423144aa81e11400956cdec9359d7aa10926b53c8", | ||
| "typeScriptVersion": "2.0" | ||
| } |
@@ -11,3 +11,3 @@ # Installation | ||
| Additional Details | ||
| * Last updated: Fri, 30 Dec 2016 17:49:08 GMT | ||
| * Last updated: Sun, 01 Jan 2017 23:46:10 GMT | ||
| * Library Dependencies: none | ||
@@ -14,0 +14,0 @@ * Module Dependencies: none |
@@ -23,3 +23,3 @@ { | ||
| "hasPackageJson": false, | ||
| "contentHash": "842218e4765848d45aa5d40bd80a41e6ae65155162d7375519bb370426c067b1" | ||
| "contentHash": "b47f36074a11a1e54fd270e423144aa81e11400956cdec9359d7aa10926b53c8" | ||
| } |
6325
-6.16%114
-2.56%