@airma/core
Advanced tools
Comparing version 15.1.0 to 15.2.0
@@ -106,6 +106,3 @@ // src/libs/tools.ts | ||
if (typeof value === "function") { | ||
return rebuildDispatchMethod( | ||
connection, | ||
p | ||
); | ||
return rebuildDispatchMethod(connection, p); | ||
} | ||
@@ -115,6 +112,7 @@ return value; | ||
}); | ||
actualReducer.update = function update(updateReducer) { | ||
actualReducer.update = function update(updateReducer, uncontrolled) { | ||
const { cacheState } = connection; | ||
connection.reducer = updateReducer; | ||
connection.current = updateReducer(cacheState); | ||
const nextState = uncontrolled ? uncontrolled.state : cacheState; | ||
connection.current = updateReducer(nextState); | ||
}; | ||
@@ -121,0 +119,0 @@ actualReducer.connect = function connect(dispatchCall) { |
@@ -31,3 +31,3 @@ export declare type Action = { | ||
agent: T; | ||
update:(reducer:AirReducer<S, T>)=>void; | ||
update:(reducer:AirReducer<S, T>,uncontrolled?:{state:S})=>void; | ||
connect: (dispatch?: Dispatch) => void; | ||
@@ -34,0 +34,0 @@ disconnect: () => void; |
@@ -7,3 +7,3 @@ { | ||
"name": "@airma/core", | ||
"version": "15.1.0", | ||
"version": "15.2.0", | ||
"description": "This is the core for agent-reducer and airma", | ||
@@ -10,0 +10,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7236
177