@types/redux-actions
Advanced tools
Comparing version 2.2.4 to 2.3.0
@@ -1,2 +0,2 @@ | ||
// Type definitions for redux-actions 2.2 | ||
// Type definitions for redux-actions 2.3 | ||
// Project: https://github.com/acdlite/redux-actions | ||
@@ -6,3 +6,5 @@ // Definitions by: Jack Hsu <https://github.com/jaysoo>, | ||
// Alec Hill <https://github.com/alechill> | ||
// Alexey Pelykh <https://github.com/alexey-pelykh> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// TypeScript Version: 2.2 | ||
@@ -26,2 +28,7 @@ export as namespace ReduxActions; | ||
// https://github.com/redux-utilities/redux-actions/blob/v2.3.0/src/combineActions.js#L27 | ||
export interface CombinedActionType { | ||
_dummy: undefined; | ||
} | ||
export type ReducerMapValue<State, Payload> = Reducer<State, Payload> | ReducerNextThrow<State, Payload> | ReducerMap<State, Payload>; | ||
@@ -47,10 +54,14 @@ | ||
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 BaseActionFunctions<TAction> = | ||
ActionFunction0<TAction> | | ||
ActionFunction1<any, TAction> | | ||
ActionFunction2<any, any, TAction> | | ||
ActionFunction3<any, any, any, TAction> | | ||
ActionFunction4<any, any, any, any, TAction> | | ||
ActionFunctionAny<TAction>; | ||
export type ActionFunctions<Payload> = BaseActionFunctions<Action<Payload>>; | ||
export type ActionWithMetaFunctions<Payload, Meta> = BaseActionFunctions<ActionMeta<Payload, Meta>>; | ||
export type Reducer<State, Payload> = (state: State, action: Action<Payload>) => State; | ||
@@ -68,5 +79,6 @@ | ||
// https://github.com/redux-utilities/redux-actions/blob/v2.3.0/src/createAction.js#L6 | ||
export function createAction( | ||
actionType: string | ||
): ActionFunction0<Action<void>>; | ||
): ActionFunctionAny<Action<any>>; | ||
@@ -102,2 +114,8 @@ export function createAction<Payload>( | ||
export function createAction<Meta>( | ||
actionType: string, | ||
payloadCreator: null | undefined, | ||
metaCreator: ActionFunctionAny<Meta> | ||
): ActionFunctionAny<ActionMeta<any, Meta>>; | ||
export function createAction<Payload, Meta>( | ||
@@ -134,3 +152,3 @@ actionType: string, | ||
export function handleAction<State, Payload>( | ||
actionType: string | ActionFunctions<Payload>, | ||
actionType: string | ActionFunctions<Payload> | CombinedActionType, | ||
reducer: Reducer<State, Payload> | ReducerNextThrow<State, Payload>, | ||
@@ -141,3 +159,3 @@ initialState: State | ||
export function handleAction<State, Payload, Meta>( | ||
actionType: { toString(): string }, | ||
actionType: string | ActionWithMetaFunctions<Payload, Meta> | CombinedActionType, | ||
reducer: ReducerMeta<State, Payload, Meta> | ReducerNextThrowMeta<State, Payload, Meta>, | ||
@@ -162,3 +180,4 @@ initialState: State | ||
export function combineActions(...actionTypes: Array<ActionFunctions<any> | string>): string; | ||
// https://github.com/redux-utilities/redux-actions/blob/v2.3.0/src/combineActions.js#L21 | ||
export function combineActions(...actionTypes: Array<ActionFunctions<any> | string | symbol>): CombinedActionType; | ||
@@ -179,1 +198,8 @@ export interface ActionMap<Payload, Meta> { | ||
}; | ||
export function createActions( | ||
actionMapOrIdentityAction: ActionMap<any, any> | string, | ||
...identityActions: string[] | ||
): { | ||
[actionName: string]: ActionFunctionAny<Action<any>> | ||
}; |
{ | ||
"name": "@types/redux-actions", | ||
"version": "2.2.4", | ||
"version": "2.3.0", | ||
"description": "TypeScript definitions for redux-actions", | ||
@@ -21,2 +21,7 @@ "license": "MIT", | ||
"githubUsername": "alechill" | ||
}, | ||
{ | ||
"name": "Alexey Pelykh", | ||
"url": "https://github.com/alexey-pelykh", | ||
"githubUsername": "alexey-pelykh" | ||
} | ||
@@ -27,8 +32,8 @@ ], | ||
"type": "git", | ||
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" | ||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git.git" | ||
}, | ||
"scripts": {}, | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "297fc1ef0c28c17bf5c221e861f94c427425c5c1a9bd5eb64ab82b45be26b544", | ||
"typeScriptVersion": "2.0" | ||
"typesPublisherContentHash": "07302d6ed8a602439f96740df62d002b0b17536bb16505863508a0209c1917b8", | ||
"typeScriptVersion": "2.2" | ||
} |
@@ -8,6 +8,6 @@ # Installation | ||
# Details | ||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/redux-actions | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped.git/tree/master/types/redux-actions | ||
Additional Details | ||
* Last updated: Thu, 15 Feb 2018 22:07:40 GMT | ||
* Last updated: Tue, 08 May 2018 17:01:00 GMT | ||
* Dependencies: none | ||
@@ -17,2 +17,2 @@ * Global values: ReduxActions | ||
# Credits | ||
These definitions were written by Jack Hsu <https://github.com/jaysoo>, Alex Gorbatchev <https://github.com/alexgorbatchev>, Alec Hill <https://github.com/alechill>. | ||
These definitions were written by Jack Hsu <https://github.com/jaysoo>, Alex Gorbatchev <https://github.com/alexgorbatchev>, Alec Hill <https://github.com/alechill>, Alexey Pelykh <https://github.com/alexey-pelykh>. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10238
158