@@ -14,10 +14,7 @@ describe('Overmind', () => {
1414 } )
1515 test ( 'should instantiate app with actions' , ( ) => { } )
1616 test ( 'should instantiate app with namespaces' , ( ) => {
17- const fooAction : Action < string > = ( action ) =>
18- action < string > ( )
19- . mutation ( ( state ) => state . foo . foo )
20- . do ( ( effects ) => effects )
17+ const fooAction : Action < string > = ( action ) => action ( )
2118
2219 const foo = {
2320 state : {
@@ -46,7 +43,7 @@ describe('Overmind', () => {
4643 }
4744 } >
4845
49- type Action < Value = void > = TAction < Value , Config >
46+ type Action < Input = void , Output = any > = TAction < Input , Output , Config >
5047
5148 const config = {
5249 namespaces : {
@@ -129,7 +126,7 @@ describe('OPERATORS', () => {
129126 type Config = TConfig < {
130127 actions : typeof config . actions
131128 } >
132- type Action < Value = void > = TAction < Value , Config >
129+ type Action < Input = void , Output = any > = TAction < Input , Output , Config >
133130
134131 const app = new App ( config )
135132
@@ -151,7 +148,7 @@ describe('OPERATORS', () => {
151148 state : typeof config . state
152149 actions : typeof config . actions
153150 } >
154- type Action < Value = void > = TAction < Value , Config >
151+ type Action < Input = void , Output = any > = TAction < Input , Output , Config >
155152
156153 const app = new App ( config )
157154
@@ -162,7 +159,7 @@ describe('OPERATORS', () => {
162159 test ( 'do' , ( ) => {
163160 expect . assertions ( 2 )
164161 const doThis : Action < string > = ( action ) =>
165- action < string > ( ) . do ( ( { foo } ) => {
162+ action ( ) . do ( ( { foo } ) => {
166163 expect ( foo . bar ( ) ) . toBe ( 'baz' )
167164 } )
168165 const config = {
@@ -183,15 +180,15 @@ describe('OPERATORS', () => {
183180 effects : typeof config . effects
184181 actions : typeof config . actions
185182 } >
186- type Action < Value = void > = TAction < Value , Config >
183+ type Action < Input = void , Output = any > = TAction < Input , Output , Config >
187184
188185 const app = new App ( config )
189186 expect ( app . actions . doThis ( 'foo' ) ) . toBe ( 'foo' )
190187 } )
191188 test ( 'map' , ( ) => {
192189 expect . assertions ( 1 )
193190 const doThis : Action < string > = ( action ) =>
194- action < string > ( ) . map ( ( _ , value ) => {
191+ action ( ) . map ( ( _ , value ) => {
195192 return value . toUpperCase ( )
196193 } )
197194 const config = {
@@ -202,7 +199,7 @@ describe('OPERATORS', () => {
202199 type Config = TConfig < {
203200 actions : typeof config . actions
204201 } >
205- type Action < Value = void > = TAction < Value , Config >
202+ type Action < Input = void , Output = any > = TAction < Input , Output , Config >
206203
207204 const app = new App ( config )
208205
@@ -224,7 +221,7 @@ describe('OPERATORS', () => {
224221 type Config = TConfig < {
225222 actions : typeof config . actions
226223 } >
227- type Action < Value = void > = TAction < Value , Config >
224+ type Action < Input = void , Output = any > = TAction < Input , Output , Config >
228225 const app = new App ( config )
229226
230227 return Promise . resolve ( app . actions . doThis ( ) ) . then ( ( value ) => {
@@ -247,7 +244,7 @@ describe('OPERATORS', () => {
247244 type Config = TConfig < {
248245 actions : typeof config . actions
249246 } >
250- type Action < Value = void > = TAction < Value , Config >
247+ type Action < Input = void , Output = any > = TAction < Input , Output , Config >
251248 const app = new App ( config )
252249 return Promise . resolve ( app . actions . doThis ( ) ) . then ( ( value ) => {
253250 expect ( value ) . toBe ( 'bar' )
@@ -268,7 +265,7 @@ describe('OPERATORS', () => {
268265 type Config = TConfig < {
269266 actions : typeof config . actions
270267 } >
271- type Action < Value = void > = TAction < Value , Config >
268+ type Action < Input = void , Output = any > = TAction < Input , Output , Config >
272269 const app = new App ( config )
273270 expect ( app . actions . doThis ( ) ) . toBe ( 'foo' )
274271 } )
@@ -288,7 +285,7 @@ describe('OPERATORS', () => {
288285 type Config = TConfig < {
289286 actions : typeof config . actions
290287 } >
291- type Action < Value = void > = TAction < Value , Config >
288+ type Action < Input = void , Output = any > = TAction < Input , Output , Config >
292289 const app = new App ( config )
293290
294291 expect ( app . actions . doThis ( ) ) . toBe ( 'bar' )
@@ -297,7 +294,7 @@ describe('OPERATORS', () => {
297294 test ( 'filter - true' , ( ) => {
298295 expect . assertions ( 1 )
299296 const doThis : Action < string > = ( action ) =>
300- action < string > ( )
297+ action ( )
301298 . filter ( ( ) => true )
302299 . map ( ( ) => 'bar' )
303300 const config = {
@@ -308,14 +305,14 @@ describe('OPERATORS', () => {
308305 type Config = TConfig < {
309306 actions : typeof config . actions
310307 } >
311- type Action < Value = void > = TAction < Value , Config >
308+ type Action < Input = void , Output = any > = TAction < Input , Output , Config >
312309 const app = new App ( config )
313310 expect ( app . actions . doThis ( 'foo' ) ) . toBe ( 'bar' )
314311 } )
315312 test ( 'filter - false' , ( ) => {
316313 expect . assertions ( 1 )
317314 const doThis : Action < string > = ( action ) =>
318- action < string > ( )
315+ action ( )
319316 . filter ( ( ) => false )
320317 . map ( ( ) => 'bar' )
321318 const config = {
@@ -326,7 +323,7 @@ describe('OPERATORS', () => {
326323 type Config = TConfig < {
327324 actions : typeof config . actions
328325 } >
329- type Action < Value = void > = TAction < Value , Config >
326+ type Action < Input = void , Output = any > = TAction < Input , Output , Config >
330327 const app = new App ( config )
331328
332329 expect ( app . actions . doThis ( 'foo' ) ) . toEqual ( { value : 'foo' } )
@@ -350,7 +347,7 @@ describe('OPERATORS', () => {
350347 type Config = TConfig < {
351348 actions : typeof config . actions
352349 } >
353- type Action < Value = void > = TAction < Value , Config >
350+ type Action < Input = void , Output = any > = TAction < Input , Output , Config >
354351 const app = new App ( config )
355352
356353 return Promise . resolve ( app . actions . doThis ( ) ) . then ( ( value ) => {
0 commit comments