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

app-redux-utils

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

app-redux-utils - npm Package Compare versions

Comparing version 1.5.0 to 1.5.1

4

CHANGELOG.md
# Changelog
### 1.5.1
* add `WatchedController` type;
### 1.5.0

@@ -4,0 +8,0 @@

5

dist/types.d.ts

@@ -33,3 +33,6 @@ import { Action as ReduxAction } from 'redux';

declare type DecoratedWatchedController<Watchers extends readonly any[]> = SimpleActions<Watchers> & ComplexAction<Watchers>;
export type { Controller, Action, ActionWithCallback, CallbackAction, Constructor, WatchedConstructor, DecoratedWatchedController, };
declare type WatchedController<TController extends Controller> = {
[methodName in keyof TController]: TController[methodName] extends (...args: any) => any ? Parameters<TController[methodName]>[0] extends Action<infer ActionType> ? (param: ActionType) => void : TController[methodName] : never;
};
export type { Controller, Action, ActionWithCallback, CallbackAction, Constructor, WatchedConstructor, DecoratedWatchedController, WatchedController, };
export { isAction };
{
"name": "app-redux-utils",
"version": "1.5.0",
"version": "1.5.1",
"description": "Helpful utils for redux",

@@ -5,0 +5,0 @@ "contributors": [

@@ -304,3 +304,3 @@ * [install](#Installation)

```tsx
import { ControllerBase, DecoratedWatchedController, Reducer, createAction } from 'app-redux-utils';
import { ControllerBase, DecoratedWatchedController, Reducer, createAction, WatchedController } from 'app-redux-utils';
import { useDispatch } from 'react-redux';

@@ -330,2 +330,3 @@

}
const myController: DecoratedWatchedController<[

@@ -336,2 +337,5 @@ 'loadUsers' |

// if you use the same name for all Controller methods (like `@watch addUser(action: ...) {...}`)
// const myController: WatchedController<MyController> = MyController as any;
export { myController as MyController };

@@ -338,0 +342,0 @@ ```

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