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.17.41 to 0.17.42

28

build/cjs/src/createReducer.js

@@ -13,6 +13,2 @@ "use strict";

/**
* @template StateType
* @typedef {StateType} State
*/
/**
* @typedef {Object.<string, any>} Payload

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

(0, _classCallCheck2["default"])(this, StoreObject);
/** @type {function():State<StateType>} */
/** @type {function():StateType} */
(0, _defineProperty2["default"])(this, "reset", void 0);
/** @type {function():State<StateType>} */
/** @type {function():StateType} */
(0, _defineProperty2["default"])(this, "getState", void 0);

@@ -50,3 +46,3 @@ /** @type {emiter<StateType, ActionType>["add"]} */

* @template StateType
* @typedef {State<StateType>|function():State<StateType>} InitStateType
* @typedef {StateType|function():StateType} InitStateType
*/

@@ -56,3 +52,3 @@ /**

* @template ActionType
* @typedef {string|boolean|null|ActionObject|Payload|function(State<StateType>):ActionType} DispatchAction
* @typedef {string|boolean|null|ActionObject|Payload|function(StateType):ActionType} DispatchAction
*/

@@ -62,3 +58,3 @@ /**

* @template ActionType
* @typedef {function(State<StateType>?, ActionType?, State<any>?):State<any>} FluxHandler
* @typedef {function(StateType?, ActionType?, StateType?):any} FluxHandler
*/

@@ -89,5 +85,5 @@ /**

* @callback EmitterEmitCall
* @param {State<StateType>} state
* @param {StateType} state
* @param {ActionType} action
* @param {State<StateType>} prevState
* @param {StateType} prevState
*/

@@ -164,3 +160,3 @@ /**

* @param {Payload} [params]
* @param {State<StateType>} [prevState]
* @param {StateType} [prevState]
* @returns {ActionType} lazy actions

@@ -189,5 +185,5 @@ */

* @callback ReducerType
* @param {State<StateType>} StateArg
* @param {StateType} StateArg
* @param {ActionType} ActionArg
* @returns {State<any>}
* @returns {any}
*/

@@ -201,3 +197,3 @@

* @param {Payload} [actionParams]
* @returns {State<StateType>} endingState
* @returns {StateType} endingState
*/

@@ -210,3 +206,3 @@

* @param {InitStateType<StateType>} [initState]
* @returns {[StoreObject<StateType>, DispatchType<StateType, ActionType>]}
* @returns {[StoreObject<StateType, ActionType>, DispatchType<StateType, ActionType>]}
*/

@@ -213,0 +209,0 @@ exports.refineAction = refineAction;

{
"version": "0.17.41",
"version": "0.17.42",
"name": "reshow-flux-base",

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

/**
* @template StateType
* @typedef {StateType} State
*/
/**
* @typedef {Object.<string, any>} Payload

@@ -23,6 +19,6 @@ */

export class StoreObject<StateType, ActionType> {
/** @type {function():State<StateType>} */
reset: () => State<StateType>;
/** @type {function():State<StateType>} */
getState: () => State<StateType>;
/** @type {function():StateType} */
reset: () => StateType;
/** @type {function():StateType} */
getState: () => StateType;
/** @type {emiter<StateType, ActionType>["add"]} */

@@ -35,18 +31,17 @@ addListener: emiter<StateType, ActionType>["add"];

export default createReducer;
export type State<StateType> = StateType;
export type Payload = {
[x: string]: any;
};
export type InitStateType<StateType> = State<StateType> | (() => State<StateType>);
export type DispatchAction<StateType, ActionType> = string | boolean | null | ActionObject | Payload | ((arg0: State<StateType>) => ActionType);
export type FluxHandler<StateType, ActionType> = (arg0: State<StateType> | null, arg1: ActionType | null, arg2: State<any> | null) => State<any>;
export type InitStateType<StateType> = StateType | (() => StateType);
export type DispatchAction<StateType, ActionType> = string | boolean | null | ActionObject | Payload | ((arg0: StateType) => ActionType);
export type FluxHandler<StateType, ActionType> = (arg0: StateType | null, arg1: ActionType | null, arg2: StateType | null) => 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: State<StateType>, action: ActionType, prevState: State<StateType>) => any;
export type ReducerType<StateType, ActionType> = (StateArg: State<StateType>, ActionArg: ActionType) => State<any>;
export type DispatchType<StateType, ActionType> = (action: DispatchAction<StateType, ActionType>, actionParams?: Payload) => State<StateType>;
export type EmitterEmitCall<StateType, ActionType> = (state: StateType, action: ActionType, prevState: StateType) => any;
export type ReducerType<StateType, ActionType> = (StateArg: StateType, ActionArg: ActionType) => any;
export type DispatchType<StateType, ActionType> = (action: DispatchAction<StateType, ActionType>, actionParams?: Payload) => StateType;
/**
* @template StateType
* @typedef {State<StateType>|function():State<StateType>} InitStateType
* @typedef {StateType|function():StateType} InitStateType
*/

@@ -56,3 +51,3 @@ /**

* @template ActionType
* @typedef {string|boolean|null|ActionObject|Payload|function(State<StateType>):ActionType} DispatchAction
* @typedef {string|boolean|null|ActionObject|Payload|function(StateType):ActionType} DispatchAction
*/

@@ -62,3 +57,3 @@ /**

* @template ActionType
* @typedef {function(State<StateType>?, ActionType?, State<any>?):State<any>} FluxHandler
* @typedef {function(StateType?, ActionType?, StateType?):any} FluxHandler
*/

@@ -89,5 +84,5 @@ /**

* @callback EmitterEmitCall
* @param {State<StateType>} state
* @param {StateType} state
* @param {ActionType} action
* @param {State<StateType>} prevState
* @param {StateType} prevState
*/

@@ -113,5 +108,5 @@ /**

* @callback ReducerType
* @param {State<StateType>} StateArg
* @param {StateType} StateArg
* @param {ActionType} ActionArg
* @returns {State<any>}
* @returns {any}
*/

@@ -124,3 +119,3 @@ /**

* @param {Payload} [actionParams]
* @returns {State<StateType>} endingState
* @returns {StateType} endingState
*/

@@ -132,4 +127,4 @@ /**

* @param {InitStateType<StateType>} [initState]
* @returns {[StoreObject<StateType>, DispatchType<StateType, ActionType>]}
* @returns {[StoreObject<StateType, ActionType>, DispatchType<StateType, ActionType>]}
*/
declare function createReducer<StateType, ActionType>(reducer: ReducerType<StateType, ActionType>, initState?: InitStateType<StateType>): [StoreObject<StateType, any>, DispatchType<StateType, ActionType>];
declare function createReducer<StateType, ActionType>(reducer: ReducerType<StateType, ActionType>, initState?: InitStateType<StateType>): [StoreObject<StateType, ActionType>, DispatchType<StateType, ActionType>];

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