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

redux-saga-final-form

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-saga-final-form - npm Package Compare versions

Comparing version 1.1.2 to 1.2.0

2

dist/index.d.ts

@@ -1,2 +0,2 @@

export declare function useListener(startActionType: string, resolveActionType: string, rejectActionType: string): (payload: any) => Promise<unknown>;
export declare function useListener(startActionType: string, resolveActionType: string, rejectActionType: string, setPayload?: (payload: any) => Object): (payload: any) => Promise<unknown>;
export declare function finalFormSaga(): Generator<import("redux-saga/effects").ForkEffect<never>, void, unknown>;

@@ -7,5 +7,9 @@ "use strict";

const pendingCallbacks = new Map();
function useListener(startActionType, resolveActionType, rejectActionType) {
function useListener(startActionType, resolveActionType, rejectActionType, setPayload) {
const dispatch = react_redux_1.useDispatch();
return (payload) => {
const action = {
type: startActionType,
payload: setPayload?.(payload) ?? payload
};
return new Promise((resolve, reject) => {

@@ -20,6 +24,3 @@ pendingCallbacks.set(resolveActionType, {

});
dispatch({
type: startActionType,
payload
});
dispatch(action);
});

@@ -26,0 +27,0 @@ };

{
"name": "redux-saga-final-form",
"version": "1.1.2",
"version": "1.2.0",
"description": "",

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

@@ -0,0 +0,0 @@ redux-saga-final-form

@@ -6,5 +6,9 @@ import { useDispatch } from 'react-redux';

export function useListener(startActionType: string, resolveActionType: string, rejectActionType: string) {
export function useListener(startActionType: string, resolveActionType: string, rejectActionType: string, setPayload?: (payload: any) => Object) {
const dispatch = useDispatch();
return (payload: any) => {
const action = {
type: startActionType,
payload: setPayload?.(payload) ?? payload
};
return new Promise((resolve, reject) => {

@@ -19,6 +23,3 @@ pendingCallbacks.set(resolveActionType, {

});
dispatch({
type: startActionType,
payload
});
dispatch(action);
})

@@ -25,0 +26,0 @@ };

@@ -0,0 +0,0 @@ {

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