diff --git a/docs/API/assets/search.js b/docs/API/assets/search.js index aaea63e..02b53f8 100644 --- a/docs/API/assets/search.js +++ b/docs/API/assets/search.js @@ -1 +1 @@ -window.searchData = {"kinds":{"4":"Namespace","128":"Class","256":"Interface","512":"Constructor","1024":"Property","262144":"Accessor","4194304":"Type alias"},"rows":[{"id":0,"kind":4194304,"name":"Dict","url":"modules.html#Dict","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":1,"kind":4,"name":"\"updux\"","url":"modules/_updux_.html","classes":"tsd-kind-namespace"},{"id":2,"kind":256,"name":"UpduxConfig","url":"interfaces/_updux_.UpduxConfig.html","classes":"tsd-kind-interface tsd-parent-kind-namespace tsd-has-type-parameter","parent":"\"updux\""},{"id":3,"kind":1024,"name":"initial","url":"interfaces/_updux_.UpduxConfig.html#initial","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"updux\".UpduxConfig"},{"id":4,"kind":1024,"name":"subduxes","url":"interfaces/_updux_.UpduxConfig.html#subduxes","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"updux\".UpduxConfig"},{"id":5,"kind":1024,"name":"actions","url":"interfaces/_updux_.UpduxConfig.html#actions","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"updux\".UpduxConfig"},{"id":6,"kind":1024,"name":"selectors","url":"interfaces/_updux_.UpduxConfig.html#selectors","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"updux\".UpduxConfig"},{"id":7,"kind":1024,"name":"mutations","url":"interfaces/_updux_.UpduxConfig.html#mutations","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"updux\".UpduxConfig"},{"id":8,"kind":1024,"name":"mappedSelectors","url":"interfaces/_updux_.UpduxConfig.html#mappedSelectors","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"updux\".UpduxConfig"},{"id":9,"kind":1024,"name":"effects","url":"interfaces/_updux_.UpduxConfig.html#effects","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"updux\".UpduxConfig"},{"id":10,"kind":1024,"name":"reactions","url":"interfaces/_updux_.UpduxConfig.html#reactions","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"updux\".UpduxConfig"},{"id":11,"kind":1024,"name":"mappedReaction","url":"interfaces/_updux_.UpduxConfig.html#mappedReaction","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"updux\".UpduxConfig"},{"id":12,"kind":128,"name":"Updux","url":"classes/_updux_.Updux.html","classes":"tsd-kind-class tsd-parent-kind-namespace tsd-has-type-parameter","parent":"\"updux\""},{"id":13,"kind":512,"name":"constructor","url":"classes/_updux_.Updux.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter","parent":"\"updux\".Updux"},{"id":14,"kind":262144,"name":"initial","url":"classes/_updux_.Updux.html#initial","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"\"updux\".Updux"},{"id":15,"kind":262144,"name":"selectors","url":"classes/_updux_.Updux.html#selectors","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"\"updux\".Updux"}],"index":{"version":"2.3.9","fields":["name","parent"],"fieldVectors":[["name/0",[0,24.277]],["parent/0",[]],["name/1",[1,13.291]],["parent/1",[]],["name/2",[2,24.277]],["parent/2",[1,1.256]],["name/3",[3,19.169]],["parent/3",[4,0.55]],["name/4",[5,24.277]],["parent/4",[4,0.55]],["name/5",[6,24.277]],["parent/5",[4,0.55]],["name/6",[7,19.169]],["parent/6",[4,0.55]],["name/7",[8,24.277]],["parent/7",[4,0.55]],["name/8",[9,24.277]],["parent/8",[4,0.55]],["name/9",[10,24.277]],["parent/9",[4,0.55]],["name/10",[11,24.277]],["parent/10",[4,0.55]],["name/11",[12,24.277]],["parent/11",[4,0.55]],["name/12",[1,13.291]],["parent/12",[1,1.256]],["name/13",[13,24.277]],["parent/13",[14,1.493]],["name/14",[3,19.169]],["parent/14",[14,1.493]],["name/15",[7,19.169]],["parent/15",[14,1.493]]],"invertedIndex":[["actions",{"_index":6,"name":{"5":{}},"parent":{}}],["constructor",{"_index":13,"name":{"13":{}},"parent":{}}],["dict",{"_index":0,"name":{"0":{}},"parent":{}}],["effects",{"_index":10,"name":{"9":{}},"parent":{}}],["initial",{"_index":3,"name":{"3":{},"14":{}},"parent":{}}],["mappedreaction",{"_index":12,"name":{"11":{}},"parent":{}}],["mappedselectors",{"_index":9,"name":{"8":{}},"parent":{}}],["mutations",{"_index":8,"name":{"7":{}},"parent":{}}],["reactions",{"_index":11,"name":{"10":{}},"parent":{}}],["selectors",{"_index":7,"name":{"6":{},"15":{}},"parent":{}}],["subduxes",{"_index":5,"name":{"4":{}},"parent":{}}],["updux",{"_index":1,"name":{"1":{},"12":{}},"parent":{"2":{},"12":{}}}],["updux\".updux",{"_index":14,"name":{},"parent":{"13":{},"14":{},"15":{}}}],["updux\".upduxconfig",{"_index":4,"name":{},"parent":{"3":{},"4":{},"5":{},"6":{},"7":{},"8":{},"9":{},"10":{},"11":{}}}],["upduxconfig",{"_index":2,"name":{"2":{}},"parent":{}}]],"pipeline":[]}} \ No newline at end of file +window.searchData = {"kinds":{"4":"Namespace","128":"Class","256":"Interface","512":"Constructor","1024":"Property","2048":"Method","65536":"Type literal","262144":"Accessor","4194304":"Type alias"},"rows":[{"id":0,"kind":4194304,"name":"Dict","url":"modules.html#Dict","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":1,"kind":4194304,"name":"Mutation","url":"modules.html#Mutation","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":2,"kind":65536,"name":"__type","url":"modules.html#Mutation.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias","parent":"Mutation"},{"id":3,"kind":4194304,"name":"ActionGenerator","url":"modules.html#ActionGenerator","classes":"tsd-kind-type-alias"},{"id":4,"kind":4,"name":"\"updux\"","url":"modules/_updux_.html","classes":"tsd-kind-namespace"},{"id":5,"kind":256,"name":"UpduxConfig","url":"interfaces/_updux_.UpduxConfig.html","classes":"tsd-kind-interface tsd-parent-kind-namespace tsd-has-type-parameter","parent":"\"updux\""},{"id":6,"kind":1024,"name":"initial","url":"interfaces/_updux_.UpduxConfig.html#initial","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"updux\".UpduxConfig"},{"id":7,"kind":1024,"name":"subduxes","url":"interfaces/_updux_.UpduxConfig.html#subduxes","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"updux\".UpduxConfig"},{"id":8,"kind":1024,"name":"actions","url":"interfaces/_updux_.UpduxConfig.html#actions","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"updux\".UpduxConfig"},{"id":9,"kind":1024,"name":"selectors","url":"interfaces/_updux_.UpduxConfig.html#selectors","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"updux\".UpduxConfig"},{"id":10,"kind":1024,"name":"mutations","url":"interfaces/_updux_.UpduxConfig.html#mutations","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"updux\".UpduxConfig"},{"id":11,"kind":1024,"name":"mappedSelectors","url":"interfaces/_updux_.UpduxConfig.html#mappedSelectors","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"updux\".UpduxConfig"},{"id":12,"kind":1024,"name":"effects","url":"interfaces/_updux_.UpduxConfig.html#effects","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"updux\".UpduxConfig"},{"id":13,"kind":1024,"name":"reactions","url":"interfaces/_updux_.UpduxConfig.html#reactions","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"updux\".UpduxConfig"},{"id":14,"kind":1024,"name":"mappedReaction","url":"interfaces/_updux_.UpduxConfig.html#mappedReaction","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"updux\".UpduxConfig"},{"id":15,"kind":128,"name":"Updux","url":"classes/_updux_.Updux.html","classes":"tsd-kind-class tsd-parent-kind-namespace tsd-has-type-parameter","parent":"\"updux\""},{"id":16,"kind":512,"name":"constructor","url":"classes/_updux_.Updux.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter","parent":"\"updux\".Updux"},{"id":17,"kind":262144,"name":"initial","url":"classes/_updux_.Updux.html#initial","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"\"updux\".Updux"},{"id":18,"kind":262144,"name":"selectors","url":"classes/_updux_.Updux.html#selectors","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"\"updux\".Updux"},{"id":19,"kind":2048,"name":"setMutation","url":"classes/_updux_.Updux.html#setMutation","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"\"updux\".Updux"},{"id":20,"kind":2048,"name":"setAction","url":"classes/_updux_.Updux.html#setAction","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"updux\".Updux"}],"index":{"version":"2.3.9","fields":["name","parent"],"fieldVectors":[["name/0",[0,26.856]],["parent/0",[]],["name/1",[1,21.748]],["parent/1",[]],["name/2",[2,26.856]],["parent/2",[1,1.984]],["name/3",[3,26.856]],["parent/3",[]],["name/4",[4,15.87]],["parent/4",[]],["name/5",[5,26.856]],["parent/5",[4,1.448]],["name/6",[6,21.748]],["parent/6",[7,0.766]],["name/7",[8,26.856]],["parent/7",[7,0.766]],["name/8",[9,26.856]],["parent/8",[7,0.766]],["name/9",[10,21.748]],["parent/9",[7,0.766]],["name/10",[11,26.856]],["parent/10",[7,0.766]],["name/11",[12,26.856]],["parent/11",[7,0.766]],["name/12",[13,26.856]],["parent/12",[7,0.766]],["name/13",[14,26.856]],["parent/13",[7,0.766]],["name/14",[15,26.856]],["parent/14",[7,0.766]],["name/15",[4,15.87]],["parent/15",[4,1.448]],["name/16",[16,26.856]],["parent/16",[17,1.265]],["name/17",[6,21.748]],["parent/17",[17,1.265]],["name/18",[10,21.748]],["parent/18",[17,1.265]],["name/19",[18,26.856]],["parent/19",[17,1.265]],["name/20",[19,26.856]],["parent/20",[17,1.265]]],"invertedIndex":[["__type",{"_index":2,"name":{"2":{}},"parent":{}}],["actiongenerator",{"_index":3,"name":{"3":{}},"parent":{}}],["actions",{"_index":9,"name":{"8":{}},"parent":{}}],["constructor",{"_index":16,"name":{"16":{}},"parent":{}}],["dict",{"_index":0,"name":{"0":{}},"parent":{}}],["effects",{"_index":13,"name":{"12":{}},"parent":{}}],["initial",{"_index":6,"name":{"6":{},"17":{}},"parent":{}}],["mappedreaction",{"_index":15,"name":{"14":{}},"parent":{}}],["mappedselectors",{"_index":12,"name":{"11":{}},"parent":{}}],["mutation",{"_index":1,"name":{"1":{}},"parent":{"2":{}}}],["mutations",{"_index":11,"name":{"10":{}},"parent":{}}],["reactions",{"_index":14,"name":{"13":{}},"parent":{}}],["selectors",{"_index":10,"name":{"9":{},"18":{}},"parent":{}}],["setaction",{"_index":19,"name":{"20":{}},"parent":{}}],["setmutation",{"_index":18,"name":{"19":{}},"parent":{}}],["subduxes",{"_index":8,"name":{"7":{}},"parent":{}}],["updux",{"_index":4,"name":{"4":{},"15":{}},"parent":{"5":{},"15":{}}}],["updux\".updux",{"_index":17,"name":{},"parent":{"16":{},"17":{},"18":{},"19":{},"20":{}}}],["updux\".upduxconfig",{"_index":7,"name":{},"parent":{"6":{},"7":{},"8":{},"9":{},"10":{},"11":{},"12":{},"13":{},"14":{}}}],["upduxconfig",{"_index":5,"name":{"5":{}},"parent":{}}]],"pipeline":[]}} \ No newline at end of file diff --git a/docs/API/classes/_updux_.Updux.html b/docs/API/classes/_updux_.Updux.html index dd48f2b..087d444 100644 --- a/docs/API/classes/_updux_.Updux.html +++ b/docs/API/classes/_updux_.Updux.html @@ -1 +1,11 @@ -
Generated using TypeDoc
Sets the local mutation for the given action.
+The action can be specified via its type +or its generator.
+Returns the same mutation function.
+Generated using TypeDoc
import Updux from 'updux';
import { produce } from 'Immer';
const updux = new Updux({
initial: { counter: 0 },
groomMutations: mutation => (...args) => produce( mutation(...args) ),
mutations: {
add: (inc=1) => draft => draft.counter += inc
}
});
-Generated using TypeDoc
Registers the action for the dux. +If no payload function is provided, whatever is +given as an argument to the action generator will +be set as-is in the action's payload.
+