chain-store 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -44,9 +44,9 @@ const squareRoot = setNumber.filter((n: number) => n >= 0).map(Math.sqrt)
44
44
 
45
45
 
46
46
  All actions in a chain are connected, and triggering any of them will trigger
47
- the others. Each action triggers in the order in which it was chained. Subscriptions
47
+ the others. Each action triggers in the order of chaining. Subscriptions
48
48
  fire after all callbacks for that action have resolved, so asynchronous callbacks
49
- can make the process take longer.
49
+ will take longer to process.
50
50
 
51
51
  ```ts
52
52
  /* Subscribe to see the output */
package/dist/index.es.js CHANGED
@@ -1,201 +1,165 @@
1
- const O = () => w([]), k = (c) => {
2
- const t = [], r = [], i = b();
3
- let n = [], s = !1, e = c;
4
- const a = (o) => {
5
- var l, p;
6
- const d = t.findIndex(([h]) => h === o);
7
- d >= 0 && ((p = (l = t[d]) == null ? void 0 : l[1]) == null || p.dispose(), t.splice(d, 1));
8
- }, u = {
9
- on: (o, d) => (a(o), t.push([
10
- o,
11
- o.watch((...l) => {
12
- s = !0;
13
- const p = r.map(([m]) => m(e)), h = d(e, ...l);
14
- h !== e && (e = h, i.emit("watch")(e)), r.forEach(([m, P], j) => {
15
- const y = m(e);
16
- y !== (p == null ? void 0 : p[j]) && P(y);
17
- }), s = !1, n.forEach((m) => m()), n = [];
1
+ const B = () => j(), C = (n) => {
2
+ const e = [], o = [];
3
+ let r = {}, u = [], t = !1, s = n;
4
+ const d = (c) => {
5
+ var a;
6
+ return (a = y(e, void 0, (h) => h[0] === c)) == null ? void 0 : a[1].dispose();
7
+ }, g = {
8
+ on: (c, a) => (d(c), e.push([
9
+ c,
10
+ c.watch((...h) => {
11
+ var f;
12
+ t = !0;
13
+ const i = o.map(([b]) => b(s)), l = a(s, ...h);
14
+ l !== s && (s = l, (f = r.emit) == null || f.call(r, s)), o.forEach(([b, w], x) => {
15
+ const A = b(s);
16
+ A !== (i == null ? void 0 : i[x]) && w(A);
17
+ }), t = !1, u.forEach((b) => b()), u = [];
18
18
  })
19
- ]), u),
20
- off: (o) => (a(o), u),
21
- map: (o) => ({
22
- getState: () => o(e),
23
- watch: (d) => (r.push([o, d]), {
19
+ ]), g),
20
+ off: (c) => (d(c), g),
21
+ map: (c) => ({
22
+ getState: () => c(s),
23
+ watch: (a) => (o.push([c, a]), {
24
24
  dispose: () => {
25
- const l = () => {
26
- const p = r.findIndex(
27
- (h) => h[0] === o && h[1] === d
28
- );
29
- p >= 0 && r.splice(p, 1);
30
- };
31
- if (s) return n.push(l);
32
- l();
25
+ const h = () => y(
26
+ o,
27
+ void 0,
28
+ ([i, l]) => i === c && l === a
29
+ );
30
+ t ? u.push(h) : h();
33
31
  }
34
32
  })
35
33
  }),
36
- getState: () => e,
37
- watch: (o) => {
38
- i.init("watch").watch(o);
39
- }
34
+ getState: () => s,
35
+ watch: S(r)
40
36
  };
41
- return u;
42
- }, w = (c, t) => {
43
- const r = b(), i = (e) => {
44
- r.emit("watch")(e);
45
- }, n = (e) => {
37
+ return g;
38
+ }, j = (n, e, o, r) => {
39
+ let u = {};
40
+ const t = [], s = (c, a) => {
41
+ var h;
42
+ (h = u.emit) == null || h.call(u, c), t.forEach((i) => i(c, a));
43
+ }, d = (c, a) => {
46
44
  try {
47
- S(i, t)(e);
45
+ if (o) return q(c, o, (h) => s(h, a));
46
+ if (r)
47
+ return q(
48
+ c,
49
+ r,
50
+ (h) => h && s(c, a)
51
+ );
52
+ s(c, a);
48
53
  } catch {
49
54
  }
50
55
  };
51
- return c.push(n), Object.assign((e) => {
52
- c.forEach((a) => a(e));
56
+ return e == null || e(d), Object.assign((c) => {
57
+ (n ?? d)(c);
53
58
  }, {
54
- ...r.init("watch"),
55
- map: (e) => w(c, {
56
- map: t != null && t.filter || t != null && t.map ? S(e, t, !0) : e
57
- }),
58
- filter: (e) => w(c, {
59
- ...t,
60
- filter: t != null && t.filter ? x(e, t.filter) : e
61
- }),
62
- target: (e, a) => t != null && t.filter ? E(c, {
63
- map: async (u) => {
64
- const o = t != null && t.map ? await t.map(u) : u;
65
- if (!await t.filter(
66
- o
67
- )) throw new Error();
68
- return o;
69
- },
70
- target: e,
71
- options: a
72
- }) : E(c, {
73
- map: t == null ? void 0 : t.map,
74
- target: e,
75
- options: a
76
- })
59
+ watch: S(u),
60
+ map: (c) => j(n ?? d, E(t), c),
61
+ filter: (c) => j(n ?? d, E(t), void 0, c),
62
+ target: (c, a) => K(
63
+ n ?? d,
64
+ E(t),
65
+ c,
66
+ a
67
+ )
77
68
  });
78
- }, E = (c, t) => {
79
- const r = b(), i = [], n = async (a, u) => {
80
- var p;
81
- const o = t.target(a);
82
- if (!(o instanceof Promise)) {
83
- r.emit("watch")(a), r.emit("done")(o, a), u == null || u.done(o, a);
69
+ }, K = (n, e, o, r) => {
70
+ let u = {}, t = {}, s = {}, d = {};
71
+ const g = [], c = async (i, l) => {
72
+ var x, A, O, P, D, m;
73
+ const f = o(i);
74
+ if (!(f instanceof Promise)) {
75
+ (x = u.emit) == null || x.call(u, i), (A = t.emit) == null || A.call(t, f, i), l == null || l.done(f, i);
84
76
  return;
85
77
  }
86
- const d = i.includes(o), l = ((p = t.options) == null ? void 0 : p.skipDuplicates) !== !1;
87
- !d && l && i.push(o), (!d || !l) && r.emit("watch")(a), window.requestAnimationFrame(async () => {
88
- try {
89
- const h = await o;
90
- (!d || !l) && r.emit("done")(h, a), u == null || u.done(h, a);
91
- } catch (h) {
92
- (!d || !l) && r.emit("fail")(h, a), u == null || u.fail(h, a);
93
- } finally {
94
- if (!d || !l)
95
- r.emit("finally")(a);
96
- else {
97
- const h = i.findIndex((m) => m === o);
98
- h >= 0 && i.splice(h, 1);
99
- }
100
- u == null || u.finish(a);
101
- }
102
- });
103
- }, s = async (a, u) => {
104
- if (!t.map) return await n(a, u);
78
+ const b = g.includes(f), w = (r == null ? void 0 : r.skipDuplicates) !== !1;
79
+ !b && w && g.push(f), (!b || !w) && ((O = u.emit) == null || O.call(u, i));
105
80
  try {
106
- const o = await t.map(a);
107
- await n(o, u);
108
- } catch {
81
+ const p = await f;
82
+ (!b || !w) && ((P = t.emit) == null || P.call(t, p, i)), l == null || l.done(p, i);
83
+ } catch (p) {
84
+ (!b || !w) && ((D = s.emit) == null || D.call(s, p, i)), l == null || l.fail(p, i);
85
+ } finally {
86
+ !b || !w ? (m = d.emit) == null || m.call(d, i) : window.requestAnimationFrame(() => {
87
+ y(g, f);
88
+ }), l == null || l.finish(i);
109
89
  }
110
90
  };
111
- return c.push(s), Object.assign((a) => {
112
- const { events: u, methods: o } = A();
113
- return c.forEach((d) => {
114
- s === d ? s(a, u) : d(a);
115
- }), o;
91
+ return e(async (i, l) => {
92
+ try {
93
+ await c(i, l);
94
+ } catch {
95
+ }
96
+ }), Object.assign((i) => {
97
+ const { events: l, methods: f } = I();
98
+ return n(i, l), f;
116
99
  }, {
117
- ...r.init("watch"),
118
- done: r.init("done"),
119
- fail: r.init("fail"),
120
- finish: r.init("finish")
100
+ watch: S(u),
101
+ done: { watch: S(t) },
102
+ fail: { watch: S(s) },
103
+ finish: { watch: S(d) }
121
104
  });
122
- }, x = (c, t, r) => (i) => {
123
- const n = (t == null ? void 0 : t(i)) ?? !0, s = (e) => {
124
- if (!e && r) throw new Error();
125
- return e && c(i);
126
- };
127
- return n instanceof Promise ? n.then(s) : s(n);
128
- }, S = (c, t, r) => (i) => {
129
- var s;
130
- const n = ((s = t == null ? void 0 : t.map) == null ? void 0 : s.call(t, i)) ?? i;
131
- return n instanceof Promise ? n.then(x(c, t == null ? void 0 : t.filter, r)).catch(() => {
132
- if (r) throw new Error();
133
- return !1;
134
- }) : x(c, t == null ? void 0 : t.filter, r)(n);
135
- }, A = (c) => {
136
- const t = {}, r = c ?? {
105
+ }, q = (n, e, o) => {
106
+ if (!e) return o(n);
107
+ const r = e(n);
108
+ if (!(r instanceof Promise)) return o(r);
109
+ r.then(o).catch(() => {
110
+ });
111
+ }, F = ["done", "fail", "finish"], I = (n) => {
112
+ const e = {}, o = n ?? {
137
113
  state: "pending",
138
- stored: {},
139
- set: (s) => {
140
- r.state = s;
141
- },
142
- controller: new I(() => r.state)
143
- }, i = {
144
- done: (s, e) => {
145
- var a;
146
- r.stored.result = s, r.set("done"), (a = t.done) == null || a.call(t, s, e);
147
- },
148
- fail: (s, e) => {
149
- var a;
150
- r.stored.error = s, r.set("fail"), (a = t.fail) == null || a.call(t, s, e);
151
- },
152
- finish: (s) => {
153
- var e;
154
- r.stored.params = s, (e = t.finish) == null || e.call(t, s);
155
- }
156
- }, n = (s, ...e) => t[s] ? void 0 : (a) => (t[s] = a, r.state !== "pending" && a(...e.map((u) => r.stored[u])), A(r).methods);
114
+ stored: [],
115
+ set: (t) => o.state = t,
116
+ controller: new z(() => o.state)
117
+ }, r = F.reduce(
118
+ (t, s, d) => ({
119
+ ...t,
120
+ [s]: (g, c) => {
121
+ var a;
122
+ o.stored[d] = g, d < 2 && o.set(s), (a = e[s]) == null || a.call(e, g, c);
123
+ }
124
+ }),
125
+ {}
126
+ ), u = (t, s) => ({
127
+ [t]: e[t] ? void 0 : (d) => (e[t] = d, o.state !== "pending" && //@ts-expect-error
128
+ d(o.stored[s], s < 2 ? o.stored[2] : void 0), I(o).methods)
129
+ });
157
130
  return {
158
- events: i,
159
- methods: Object.assign(r.controller, {
160
- done: n("done", "result", "params"),
161
- fail: n("fail", "error", "params"),
162
- finish: n("finish", "params")
163
- })
131
+ events: r,
132
+ methods: Object.assign(
133
+ o.controller,
134
+ F.reduce(
135
+ (t, s, d) => ({
136
+ ...t,
137
+ ...u(s, d)
138
+ }),
139
+ {}
140
+ )
141
+ )
164
142
  };
165
143
  };
166
- class I {
167
- constructor(t) {
168
- this.getState = t;
144
+ class z {
145
+ constructor(e) {
146
+ this.getState = e;
169
147
  }
170
148
  get state() {
171
149
  return this.getState();
172
150
  }
173
151
  }
174
- const b = () => {
175
- const c = {}, t = (i, n) => {
176
- var s;
177
- (s = c[i]) != null && s.includes(n) && (c[i] = c[i].filter(
178
- (e) => e !== n
179
- ));
180
- }, r = (i, n) => {
181
- var s;
182
- (s = c[i]) != null && s.includes(n) || (c[i] = [...c[i] ?? [], n]);
183
- };
184
- return {
185
- init: (i) => ({
186
- watch: (n) => (r(i, n), {
187
- dispose: () => t(i, n)
188
- })
189
- }),
190
- emit: (i) => (...n) => {
191
- var s;
192
- (s = c[i]) == null || s.forEach(
193
- (e) => e(...n)
194
- );
195
- }
196
- };
152
+ const E = (n) => (e) => n.push(e), y = (n, e, o) => {
153
+ const r = n.findIndex(o ?? ((u) => e === u));
154
+ return r >= 0 ? n.splice(r, 1)[0] : void 0;
155
+ }, S = (n) => (e) => {
156
+ if (n != null && n.watch) return n.watch(e);
157
+ const o = [], r = (t) => y(o, t), u = (t) => !o.includes(t) && o.push(t);
158
+ return n.watch = (t) => (u(t), {
159
+ dispose: () => r(t)
160
+ }), n.emit = (...t) => o.forEach((s) => s(...t)), n.watch(e);
197
161
  };
198
162
  export {
199
- O as createAction,
200
- k as createStore
163
+ B as createAction,
164
+ C as createStore
201
165
  };
package/dist/index.umd.js CHANGED
@@ -1 +1 @@
1
- (function(m,b){typeof exports=="object"&&typeof module<"u"?b(exports):typeof define=="function"&&define.amd?define(["exports"],b):(m=typeof globalThis<"u"?globalThis:m||self,b(m["chain-store"]={}))})(this,function(m){"use strict";const b=()=>y([]),P=c=>{const t=[],r=[],a=S();let i=[],s=!1,e=c;const n=o=>{var l,p;const d=t.findIndex(([h])=>h===o);d>=0&&((p=(l=t[d])==null?void 0:l[1])==null||p.dispose(),t.splice(d,1))},u={on:(o,d)=>(n(o),t.push([o,o.watch((...l)=>{s=!0;const p=r.map(([w])=>w(e)),h=d(e,...l);h!==e&&(e=h,a.emit("watch")(e)),r.forEach(([w,I],T)=>{const j=w(e);j!==(p==null?void 0:p[T])&&I(j)}),s=!1,i.forEach(w=>w()),i=[]})]),u),off:o=>(n(o),u),map:o=>({getState:()=>o(e),watch:d=>(r.push([o,d]),{dispose:()=>{const l=()=>{const p=r.findIndex(h=>h[0]===o&&h[1]===d);p>=0&&r.splice(p,1)};if(s)return i.push(l);l()}})}),getState:()=>e,watch:o=>{a.init("watch").watch(o)}};return u},y=(c,t)=>{const r=S(),a=e=>{r.emit("watch")(e)},i=e=>{try{f(a,t)(e)}catch{}};return c.push(i),Object.assign(e=>{c.forEach(n=>n(e))},{...r.init("watch"),map:e=>y(c,{map:t!=null&&t.filter||t!=null&&t.map?f(e,t,!0):e}),filter:e=>y(c,{...t,filter:t!=null&&t.filter?x(e,t.filter):e}),target:(e,n)=>t!=null&&t.filter?E(c,{map:async u=>{const o=t!=null&&t.map?await t.map(u):u;if(!await t.filter(o))throw new Error;return o},target:e,options:n}):E(c,{map:t==null?void 0:t.map,target:e,options:n})})},E=(c,t)=>{const r=S(),a=[],i=async(n,u)=>{var p;const o=t.target(n);if(!(o instanceof Promise)){r.emit("watch")(n),r.emit("done")(o,n),u==null||u.done(o,n);return}const d=a.includes(o),l=((p=t.options)==null?void 0:p.skipDuplicates)!==!1;!d&&l&&a.push(o),(!d||!l)&&r.emit("watch")(n),window.requestAnimationFrame(async()=>{try{const h=await o;(!d||!l)&&r.emit("done")(h,n),u==null||u.done(h,n)}catch(h){(!d||!l)&&r.emit("fail")(h,n),u==null||u.fail(h,n)}finally{if(!d||!l)r.emit("finally")(n);else{const h=a.findIndex(w=>w===o);h>=0&&a.splice(h,1)}u==null||u.finish(n)}})},s=async(n,u)=>{if(!t.map)return await i(n,u);try{const o=await t.map(n);await i(o,u)}catch{}};return c.push(s),Object.assign(n=>{const{events:u,methods:o}=A();return c.forEach(d=>{s===d?s(n,u):d(n)}),o},{...r.init("watch"),done:r.init("done"),fail:r.init("fail"),finish:r.init("finish")})},x=(c,t,r)=>a=>{const i=(t==null?void 0:t(a))??!0,s=e=>{if(!e&&r)throw new Error;return e&&c(a)};return i instanceof Promise?i.then(s):s(i)},f=(c,t,r)=>a=>{var s;const i=((s=t==null?void 0:t.map)==null?void 0:s.call(t,a))??a;return i instanceof Promise?i.then(x(c,t==null?void 0:t.filter,r)).catch(()=>{if(r)throw new Error;return!1}):x(c,t==null?void 0:t.filter,r)(i)},A=c=>{const t={},r=c??{state:"pending",stored:{},set:s=>{r.state=s},controller:new O(()=>r.state)},a={done:(s,e)=>{var n;r.stored.result=s,r.set("done"),(n=t.done)==null||n.call(t,s,e)},fail:(s,e)=>{var n;r.stored.error=s,r.set("fail"),(n=t.fail)==null||n.call(t,s,e)},finish:s=>{var e;r.stored.params=s,(e=t.finish)==null||e.call(t,s)}},i=(s,...e)=>t[s]?void 0:n=>(t[s]=n,r.state!=="pending"&&n(...e.map(u=>r.stored[u])),A(r).methods);return{events:a,methods:Object.assign(r.controller,{done:i("done","result","params"),fail:i("fail","error","params"),finish:i("finish","params")})}};class O{constructor(t){this.getState=t}get state(){return this.getState()}}const S=()=>{const c={},t=(a,i)=>{var s;(s=c[a])!=null&&s.includes(i)&&(c[a]=c[a].filter(e=>e!==i))},r=(a,i)=>{var s;(s=c[a])!=null&&s.includes(i)||(c[a]=[...c[a]??[],i])};return{init:a=>({watch:i=>(r(a,i),{dispose:()=>t(a,i)})}),emit:a=>(...i)=>{var s;(s=c[a])==null||s.forEach(e=>e(...i))}}};m.createAction=b,m.createStore=P,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})});
1
+ (function(w,y){typeof exports=="object"&&typeof module<"u"?y(exports):typeof define=="function"&&define.amd?define(["exports"],y):(w=typeof globalThis<"u"?globalThis:w||self,y(w["chain-store"]={}))})(this,function(w){"use strict";const y=()=>E(),M=n=>{const s=[],e=[];let r={},u=[],t=!1,o=n;const d=c=>{var l;return(l=x(s,void 0,a=>a[0]===c))==null?void 0:l[1].dispose()},g={on:(c,l)=>(d(c),s.push([c,c.watch((...a)=>{var h;t=!0;const i=e.map(([b])=>b(o)),f=l(o,...a);f!==o&&(o=f,(h=r.emit)==null||h.call(r,o)),e.forEach(([b,p],m)=>{const A=b(o);A!==(i==null?void 0:i[m])&&p(A)}),t=!1,u.forEach(b=>b()),u=[]})]),g),off:c=>(d(c),g),map:c=>({getState:()=>c(o),watch:l=>(e.push([c,l]),{dispose:()=>{const a=()=>x(e,void 0,([i,f])=>i===c&&f===l);t?u.push(a):a()}})}),getState:()=>o,watch:S(r)};return g},E=(n,s,e,r)=>{let u={};const t=[],o=(c,l)=>{var a;(a=u.emit)==null||a.call(u,c),t.forEach(i=>i(c,l))},d=(c,l)=>{try{if(e)return P(c,e,a=>o(a,l));if(r)return P(c,r,a=>a&&o(c,l));o(c,l)}catch{}};return s==null||s(d),Object.assign(c=>{(n??d)(c)},{watch:S(u),map:c=>E(n??d,O(t),c),filter:c=>E(n??d,O(t),void 0,c),target:(c,l)=>z(n??d,O(t),c,l)})},z=(n,s,e,r)=>{let u={},t={},o={},d={};const g=[],c=async(i,f)=>{var m,A,q,F,I,K;const h=e(i);if(!(h instanceof Promise)){(m=u.emit)==null||m.call(u,i),(A=t.emit)==null||A.call(t,h,i),f==null||f.done(h,i);return}const b=g.includes(h),p=(r==null?void 0:r.skipDuplicates)!==!1;!b&&p&&g.push(h),(!b||!p)&&((q=u.emit)==null||q.call(u,i));try{const j=await h;(!b||!p)&&((F=t.emit)==null||F.call(t,j,i)),f==null||f.done(j,i)}catch(j){(!b||!p)&&((I=o.emit)==null||I.call(o,j,i)),f==null||f.fail(j,i)}finally{!b||!p?(K=d.emit)==null||K.call(d,i):window.requestAnimationFrame(()=>{x(g,h)}),f==null||f.finish(i)}};return s(async(i,f)=>{try{await c(i,f)}catch{}}),Object.assign(i=>{const{events:f,methods:h}=D();return n(i,f),h},{watch:S(u),done:{watch:S(t)},fail:{watch:S(o)},finish:{watch:S(d)}})},P=(n,s,e)=>{if(!s)return e(n);const r=s(n);if(!(r instanceof Promise))return e(r);r.then(e).catch(()=>{})},T=["done","fail","finish"],D=n=>{const s={},e=n??{state:"pending",stored:[],set:t=>e.state=t,controller:new B(()=>e.state)},r=T.reduce((t,o,d)=>({...t,[o]:(g,c)=>{var l;e.stored[d]=g,d<2&&e.set(o),(l=s[o])==null||l.call(s,g,c)}}),{}),u=(t,o)=>({[t]:s[t]?void 0:d=>(s[t]=d,e.state!=="pending"&&d(e.stored[o],o<2?e.stored[2]:void 0),D(e).methods)});return{events:r,methods:Object.assign(e.controller,T.reduce((t,o,d)=>({...t,...u(o,d)}),{}))}};class B{constructor(s){this.getState=s}get state(){return this.getState()}}const O=n=>s=>n.push(s),x=(n,s,e)=>{const r=n.findIndex(e??(u=>s===u));return r>=0?n.splice(r,1)[0]:void 0},S=n=>s=>{if(n!=null&&n.watch)return n.watch(s);const e=[],r=t=>x(e,t),u=t=>!e.includes(t)&&e.push(t);return n.watch=t=>(u(t),{dispose:()=>r(t)}),n.emit=(...t)=>e.forEach(o=>o(...t)),n.watch(s)};w.createAction=y,w.createStore=M,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})});
package/dist/types.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  type ActionCall<Params, Result extends unknown = void> = (params: Params) => Result;
2
- export type ActionPromise<Params, Result, Error, Methods = ActionPromiseMethods<Params, Result, Error>, Remaining extends keyof Methods = keyof Methods> = {
2
+ export type ActionPromise<Params, Result, Error, Methods = ActionPromiseEvents<Params, Result, Error>, Remaining extends keyof Methods = keyof Methods> = {
3
3
  state: "pending" | "done" | "fail";
4
4
  } & {
5
5
  [K in Remaining]: (fn: Methods[K]) => ActionPromise<Params, Result, Error, Methods, Exclude<Remaining, K>>;
6
6
  };
7
- export type ActionPromiseMethods<Params, Result, Error> = {
7
+ export type ActionPromiseEvents<Params = any, Result = any, Error = any> = {
8
8
  done: (result: Result, params: Params) => void;
9
9
  fail: (error: Error, params: Params) => void;
10
10
  finish: (params: Params) => void;
@@ -20,7 +20,7 @@ export interface Subscription {
20
20
  export interface Unit<Params> {
21
21
  watch: (watcher: (...args: Args<Params>) => void) => Subscription;
22
22
  }
23
- export interface Action<Input, Output = Input> extends ActionCall<Input>, Unit<Input> {
23
+ export interface Action<Input, Output = Input> extends ActionCall<Input>, Unit<Output> {
24
24
  filter: (fn: ChainFn<Output, boolean>) => Action<Input, Output>;
25
25
  map: <Mapped>(fn: ChainFn<Output, Mapped>) => Action<Input, Mapped>;
26
26
  target: <Result, Err = Error>(fn: ChainFn<Output, Result>) => AsyncAction<Input, Result, Output, Err>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "chain-store",
3
3
  "description": "Simple event-based state manager",
4
- "version": "0.0.2",
4
+ "version": "0.0.3",
5
5
  "author": {
6
6
  "name": "Aleksandr Gurianov",
7
7
  "url": "http://golova.pro"