Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/redux-actions

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/redux-actions - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

113

redux-actions/index.d.ts

@@ -7,2 +7,3 @@ // Type definitions for redux-actions 2.2

// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

@@ -26,8 +27,8 @@ export as namespace ReduxActions;

export interface ReducerMap<State, Payload> {
[actionType: string]: Reducer<State, Payload> | ReducerNextThrow<State, Payload>;
export interface ReducerMap<State> {
[actionType: string]: Reducer<State, any> | ReducerNextThrow<State, any>;
}
export interface ReducerMapMeta<State, Payload, Meta> {
[actionType: string]: ReducerMeta<State, Payload, Meta> | ReducerNextThrowMeta<State, Payload, Meta>;
export interface ReducerMapMeta<State, Meta> {
[actionType: string]: ReducerMeta<State, any, Meta> | ReducerNextThrowMeta<State, any, Meta>;
}

@@ -45,9 +46,3 @@

export 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>>;
export type ActionFunctions<Payload> = ActionFunctionAny<Action<Payload>>;

@@ -59,7 +54,3 @@ export type Reducer<State, Payload> = (state: State, action: Action<Payload>) => State;

/** argument inferring borrowed from lodash definitions */
export type ActionFunction0<R> = () => R;
export type ActionFunction1<T1, R> = (t1: T1) => R;
export type ActionFunction2<T1, T2, R> = (t1: T1, t2: T2) => R;
export type ActionFunction3<T1, T2, T3, R> = (t1: T1, t2: T2, t3: T3) => R;
export type ActionFunction4<T1, T2, T3, T4, R> = (t1: T1, t2: T2, t3: T3, t4: T4) => R;
export type ActionFunction<R, T1 = undefined, T2 = undefined, T3 = undefined, T4 = undefined> = (t1?: T1, t2?: T2, t3?: T3, t4?: T4) => R;
export type ActionFunctionAny<R> = (...args: any[]) => R;

@@ -69,32 +60,12 @@

actionType: string
): ActionFunction0<Action<void>>;
): ActionFunction<Action<void>>;
export function createAction<Payload>(
export function createAction<Payload, Arg1 = undefined, Arg2 = undefined, Arg3 = undefined, Arg4 = undefined>(
actionType: string,
payloadCreator: ActionFunction0<Payload>
): ActionFunction0<Action<Payload>>;
payloadCreator: ActionFunction<Payload, Arg1, Arg2, Arg3, Arg4>
): ActionFunction<Action<Payload>, Arg1, Arg2, Arg3, Arg4>;
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, 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>(
actionType: string
): ActionFunction1<Payload, Action<Payload>>;
): ActionFunction<Action<Payload>, Payload>;

@@ -107,25 +78,7 @@ export function createAction<Payload, Meta>(

export function createAction<Payload, Meta, Arg1>(
actionType: string,
payloadCreator: ActionFunction1<Arg1, Payload>,
metaCreator: ActionFunction1<Arg1, Meta>
): ActionFunction1<Arg1, ActionMeta<Payload, Meta>>;
export function createAction<Payload, Meta, Arg1, Arg2>(
actionType: string,
payloadCreator: ActionFunction2<Arg1, Arg2, Payload>,
metaCreator: ActionFunction2<Arg1, Arg2, Meta>
): ActionFunction2<Arg1, Arg2, ActionMeta<Payload, Meta>>;
export function createAction<Payload, Meta, Arg1, Arg2, Arg3>(
actionType: string,
payloadCreator: ActionFunction3<Arg1, Arg2, Arg3, Payload>,
metaCreator: ActionFunction3<Arg1, Arg2, Arg3, Meta>
): ActionFunction3<Arg1, Arg2, Arg3, ActionMeta<Payload, Meta>>;
export function createAction<Payload, Meta, Arg1, Arg2, Arg3, Arg4>(
actionType: string,
payloadCreator: ActionFunction4<Arg1, Arg2, Arg3, Arg4, Payload>,
metaCreator: ActionFunction4<Arg1, Arg2, Arg3, Arg4, Meta>
): ActionFunction4<Arg1, Arg2, Arg3, Arg4, ActionMeta<Payload, Meta>>;
payloadCreator: ActionFunction<Payload, Arg1, Arg2, Arg3, Arg4>,
metaCreator: ActionFunction<Meta, Arg1, Arg2, Arg3, Arg4>
): ActionFunction<ActionMeta<Payload, Meta>, Arg1, Arg2, Arg3, Arg4>;

@@ -144,27 +97,29 @@ export function handleAction<State, Payload>(

export function handleActions<StateAndPayload>(
reducerMap: ReducerMap<StateAndPayload, StateAndPayload>,
initialState: StateAndPayload
): Reducer<StateAndPayload, StateAndPayload>;
export function handleActions<State, Payload>(
reducerMap: ReducerMap<State, Payload>,
export function handleActions<State>(
reducerMap: ReducerMap<State>,
initialState: State
): Reducer<State, Payload>;
): Reducer<State, any>;
export function handleActions<State, Payload, Meta>(
reducerMap: ReducerMapMeta<State, Payload, Meta>,
export function handleActions<State, Meta>(
reducerMap: ReducerMapMeta<State, Meta>,
initialState: State
): ReducerMeta<State, Payload, Meta>;
): ReducerMeta<State, any, Meta>;
export function combineActions(...actionTypes: Array<ActionFunctions<any> | string>): string;
export interface ActionMap<Payload, Meta> {
export interface ActionMap<Payload, Meta = undefined> {
[actionType: string]:
ActionMap<Payload, Meta> |
ActionFunctionAny<Payload> |
[ActionFunctionAny<Payload>, ActionFunctionAny<Meta>] |
undefined;
ActionMap<Payload, Meta> |
ActionFunctionAny<Payload> |
[ActionFunctionAny<Payload>, ActionFunctionAny<Meta>] |
undefined;
}
export function createActions<Payload>(
actionMap: ActionMap<Payload>,
...identityActions: string[]
): {
[actionName: string]: ActionFunctionAny<Action<Payload>>
};
export function createActions<Payload, Meta>(

@@ -174,3 +129,3 @@ actionMap: ActionMap<Payload, Meta>,

): {
[actionName: string]: ActionFunctionAny<Action<Payload>>
[actionName: string]: ActionFunctionAny<ActionMeta<Payload, Meta>>
};
{
"name": "@types/redux-actions",
"version": "2.2.0",
"version": "2.2.1",
"description": "TypeScript definitions for redux-actions",

@@ -30,4 +30,4 @@ "license": "MIT",

"dependencies": {},
"typesPublisherContentHash": "9489f5d997cac44bc3f879de9e7f52978b6a7aa214da4e65a51fa32670796b10",
"typeScriptVersion": "2.0"
"typesPublisherContentHash": "4be7edbd4f2367e271e6585bdc2c22b159dc655731b983beb3f3bcbf6e9f723c",
"typeScriptVersion": "2.3"
}

@@ -11,3 +11,3 @@ # Installation

Additional Details
* Last updated: Thu, 07 Sep 2017 22:03:13 GMT
* Last updated: Wed, 20 Sep 2017 22:08:06 GMT
* Dependencies: none

@@ -14,0 +14,0 @@ * Global values: ReduxActions

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc