Socket
Socket
Sign inDemoInstall

reshow-flux-base

Package Overview
Dependencies
Maintainers
1
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reshow-flux-base - npm Package Compare versions

Comparing version 0.18.0 to 0.18.1

21

build/cjs/createReducer.js

@@ -19,3 +19,3 @@ "use strict";

* @template ActionType
* @typedef {import('./type').RefineAction<ActionType>} RefineAction
* @typedef {import('./type').RefinedAction<ActionType>} RefinedAction
*/

@@ -30,2 +30,3 @@

* @template ActionType
*
* @callback DispatchCallback

@@ -93,6 +94,7 @@ * @param {StateType} State

* @template ActionType
*
* @param {DispatchAction<StateType, ActionType>} action
* @param {Payload} [params]
* @param {StateType} [prevState]
* @returns {RefineAction<ActionType>} lazy actions
* @returns {ActionObject|ActionType} lazy actions
*/

@@ -119,5 +121,6 @@ var refineAction = exports.refineAction = function refineAction(action, params, prevState) {

* @template ActionType
*
* @callback ReducerType
* @param {StateType} StateArg
* @param {RefineAction<ActionType>} ActionArg
* @param {StateType} ReducerState
* @param {RefinedAction<ActionType>} ReducerAction
* @returns {StateType}

@@ -134,3 +137,4 @@ */

* @template ActionType
* @callback DispatchType
*
* @callback DispatchFunction
* @param {DispatchAction<StateType, ActionType>} action

@@ -144,5 +148,6 @@ * @param {Payload} [actionParams]

* @template ActionType
* @param {ReducerType<StateType, DispatchAction<StateType, ActionType>>} reducer
*
* @param {ReducerType<StateType, RefinedAction<ActionType>>} reducer
* @param {InitStateType<StateType>} [initState]
* @returns {[StoreObject<StateType, ActionType>, DispatchType<StateType, ActionType>]}
* @returns {[StoreObject<StateType, ActionType>, DispatchFunction<StateType, ActionType>]}
*/

@@ -155,3 +160,3 @@ var createReducer = function createReducer(reducer, initState) {

/**
* @type {DispatchType<StateType, ActionType>}
* @type {DispatchFunction<StateType, ActionType>}
*/

@@ -158,0 +163,0 @@ var dispatch = function dispatch(action, actionParams) {

@@ -27,4 +27,4 @@ "use strict";

/**
* @template [ActionType=ActionObject]
* @typedef {ActionType} RefineAction
* @template [ActionType = ActionObject]
* @typedef {ActionType|ActionObject} RefinedAction
*/

@@ -34,5 +34,6 @@ /**

* @template ActionType
*
* @callback FluxHandler
* @param {StateType} NextState
* @param {RefineAction<ActionType>} Action
* @param {RefinedAction<ActionType>} Action
* @param {StateType} PrevState

@@ -44,2 +45,11 @@ * @returns{any}

* @template ActionType
*
* @callback EmitterEmitCall
* @param {StateType} state
* @param {RefinedAction<ActionType>} action
* @param {StateType} prevState
*/
/**
* @template StateType
* @template ActionType
* @callback EmitterResetCall

@@ -65,10 +75,2 @@ * @returns {FluxHandler<StateType, ActionType>[]}

* @template ActionType
* @callback EmitterEmitCall
* @param {StateType} state
* @param {RefineAction<ActionType>} action
* @param {StateType} prevState
*/
/**
* @template StateType
* @template ActionType
* @interface

@@ -75,0 +77,0 @@ */

{
"version": "0.18.0",
"version": "0.18.1",
"name": "reshow-flux-base",

@@ -4,0 +4,0 @@ "repository": {

@@ -1,17 +0,19 @@

export function refineAction<StateType, ActionType>(action: DispatchAction<StateType, ActionType>, params?: Payload, prevState?: StateType): ActionType;
export function refineAction<StateType, ActionType>(action: DispatchAction<StateType, ActionType>, params?: Payload, prevState?: StateType): ActionObject | ActionType;
export default createReducer;
export type FluxHandler<StateType, ActionType> = import('./type').FluxHandler<StateType, ActionType>;
export type RefineAction<ActionType> = import('./type').RefineAction<ActionType>;
export type RefinedAction<ActionType> = import('./type').RefinedAction<ActionType>;
export type Payload = import('./type').Payload;
export type DispatchCallback<StateType, ActionType> = (State: StateType) => ActionType;
export type DispatchAction<StateType, ActionType> = string | ActionType | DispatchCallback<StateType, ActionType>;
export type ReducerType<StateType, ActionType> = (StateArg: StateType, ActionArg: RefineAction<ActionType>) => StateType;
export type ReducerType<StateType, ActionType> = (ReducerState: StateType, ReducerAction: RefinedAction<ActionType>) => StateType;
export type InitStateType<StateType> = StateType | (() => StateType);
export type DispatchType<StateType, ActionType> = (action: DispatchAction<StateType, ActionType>, actionParams?: Payload) => StateType;
export type DispatchFunction<StateType, ActionType> = (action: DispatchAction<StateType, ActionType>, actionParams?: Payload) => StateType;
import { ActionObject } from "./type";
/**
* @template StateType
* @template ActionType
*
* @callback ReducerType
* @param {StateType} StateArg
* @param {RefineAction<ActionType>} ActionArg
* @param {StateType} ReducerState
* @param {RefinedAction<ActionType>} ReducerAction
* @returns {StateType}

@@ -26,3 +28,4 @@ */

* @template ActionType
* @callback DispatchType
*
* @callback DispatchFunction
* @param {DispatchAction<StateType, ActionType>} action

@@ -35,7 +38,8 @@ * @param {Payload} [actionParams]

* @template ActionType
* @param {ReducerType<StateType, DispatchAction<StateType, ActionType>>} reducer
*
* @param {ReducerType<StateType, RefinedAction<ActionType>>} reducer
* @param {InitStateType<StateType>} [initState]
* @returns {[StoreObject<StateType, ActionType>, DispatchType<StateType, ActionType>]}
* @returns {[StoreObject<StateType, ActionType>, DispatchFunction<StateType, ActionType>]}
*/
declare function createReducer<StateType, ActionType>(reducer: ReducerType<StateType, DispatchAction<StateType, ActionType>>, initState?: InitStateType<StateType>): [StoreObject<StateType, ActionType>, DispatchType<StateType, ActionType>];
declare function createReducer<StateType, ActionType>(reducer: ReducerType<StateType, RefinedAction<ActionType>>, initState?: InitStateType<StateType>): [StoreObject<StateType, ActionType>, DispatchFunction<StateType, ActionType>];
import { StoreObject } from "./type";
export { default as SimpleMap } from "./SimpleMap";
export type InitStateType<StateType> = import("./createReducer").InitStateType<StateType>;
export type ReducerType<StateType, ActionType> = import("./createReducer").ReducerType<StateType, ActionType>;
export type DispatchType<StateType, ActionType> = import("./createReducer").DispatchType<StateType, ActionType>;
export type DispatchFunction<StateType, ActionType> = import("./createReducer").DispatchFunction<StateType, ActionType>;
export { default as createReducer, refineAction } from "./createReducer";
export { StoreObject, ActionObject } from "./type";

@@ -17,4 +17,4 @@ /**

/**
* @template [ActionType=ActionObject]
* @typedef {ActionType} RefineAction
* @template [ActionType = ActionObject]
* @typedef {ActionType|ActionObject} RefinedAction
*/

@@ -24,5 +24,6 @@ /**

* @template ActionType
*
* @callback FluxHandler
* @param {StateType} NextState
* @param {RefineAction<ActionType>} Action
* @param {RefinedAction<ActionType>} Action
* @param {StateType} PrevState

@@ -34,2 +35,11 @@ * @returns{any}

* @template ActionType
*
* @callback EmitterEmitCall
* @param {StateType} state
* @param {RefinedAction<ActionType>} action
* @param {StateType} prevState
*/
/**
* @template StateType
* @template ActionType
* @callback EmitterResetCall

@@ -55,10 +65,2 @@ * @returns {FluxHandler<StateType, ActionType>[]}

* @template ActionType
* @callback EmitterEmitCall
* @param {StateType} state
* @param {RefineAction<ActionType>} action
* @param {StateType} prevState
*/
/**
* @template StateType
* @template ActionType
* @interface

@@ -95,7 +97,7 @@ */

export type SAFE_UNDEFINED = import("reshow-constant").SAFE_UNDEFINED;
export type RefineAction<ActionType = ActionObject> = ActionType;
export type FluxHandler<StateType, ActionType> = (NextState: StateType, Action: RefineAction<ActionType>, PrevState: StateType) => any;
export type RefinedAction<ActionType = ActionObject> = ActionType | ActionObject;
export type FluxHandler<StateType, ActionType> = (NextState: StateType, Action: RefinedAction<ActionType>, PrevState: StateType) => any;
export type EmitterEmitCall<StateType, ActionType> = (state: StateType, action: RefinedAction<ActionType>, prevState: StateType) => any;
export type EmitterResetCall<StateType, ActionType> = () => FluxHandler<StateType, ActionType>[];
export type EmitterAddCall<StateType, ActionType> = (handler: FluxHandler<StateType, ActionType>) => number;
export type EmitterRemoveCall<StateType, ActionType> = (handler: FluxHandler<StateType, ActionType>) => FluxHandler<StateType, ActionType>[];
export type EmitterEmitCall<StateType, ActionType> = (state: StateType, action: RefineAction<ActionType>, prevState: StateType) => any;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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