New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

redux-actions-helper

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-actions-helper - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

3

package.json
{
"name": "redux-actions-helper",
"version": "1.0.3",
"version": "1.0.4",
"description": "",

@@ -37,4 +37,5 @@ "main": "dist/index.js",

"jest": "18.0.0",
"redux": "*",
"typescript": "2.3.4"
}
}

@@ -1,6 +0,4 @@

export interface IBaseAction {
type: string
}
import { Reducer, Action } from 'redux'
export interface IAction<Payload> extends IBaseAction {
export interface IAction<Payload> extends Action {
payload?: Payload

@@ -10,6 +8,8 @@ error?: boolean

export interface IActionMeta<Payload, Meta> extends IAction<Payload> {
meta: Meta
export interface IActionMeta<Payload, Meta = any> extends IAction<Payload> {
meta?: Meta
}
export type IAnyAction = IActionMeta<any>
export interface IActionFunction<R>{

@@ -21,10 +21,10 @@ (...args: any[]): R

export interface IActionFunctionMulti<R, T, M>{
(...args: any[]): R
success: (...args: any[]) => T
fail: (...args: any[]) => M
toString: () => string
(...args: any[]): R
success: (...args: any[]) => T
fail: (...args: any[]) => M
toString: () => string
}
export function createActionPrefix(
prefix?: string
prefix?: string
) : (name: string) => string

@@ -44,3 +44,3 @@

IActionMeta<FailPayload, FailPayload>
>
>

@@ -55,23 +55,22 @@ export function createAction<Payload, Meta, SuccessPayload, FailPayload>(

IActionMeta<FailPayload, FailPayload>
>
>
export type Reducer<State, Payload> = (state: State, action: IAction<Payload>) => State
export interface IReducerNextThrow<State, Payload> {
next?(state: State, action: IAction<Payload>): State
throw?(state: State, action: IAction<Payload>): State
export interface IReducerNextThrow<State, A extends Action = IAnyAction> {
next?(state: State, action: A): State
throw?(state: State, action: A): State
}
export interface IReducerMap<State, Payload> {
[actionType: string]: Reducer<State, Payload> | IReducerNextThrow<State, Payload>
export interface IReducerMap<State, A extends Action = IAnyAction> {
[actionType: string]: Reducer<State, A> | IReducerNextThrow<State, A>
}
export function handleActions<State, Payload={}>(
reducerMap: IReducerMap<State, Payload>,
export function handleActions<State, Payload=any>(
reducerMap: IReducerMap<State, IActionMeta<Payload>>,
initialState: State,
): Reducer<State, Payload>
): Reducer<State, IActionMeta<Payload>>
export function linstenActions<State, Payload={}>(
reducerMapListener: () => IReducerMap<State, Payload>,
export function linstenActions<State, Payload=any>(
reducerMapListener: () => IReducerMap<State, IActionMeta<Payload>>,
initialState: State,
): Reducer<State, Payload>
): Reducer<State, IActionMeta<Payload>>
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