1- import App , { Action , TAction , TApp , modules } from './'
1+ import App , { Action , TAction , TConfig , modules } from './'
22
33describe ( 'Overmind' , ( ) => {
44 test ( 'should instantiate app with state' , ( ) => {
@@ -74,7 +74,7 @@ describe('Overmind', () => {
7474 } ,
7575 } )
7676
77- type App = TApp < {
77+ type Config = TConfig < {
7878 state : {
7979 foo : typeof config . state . foo
8080 bar : typeof config . state . bar
@@ -87,7 +87,7 @@ describe('Overmind', () => {
8787 bar : typeof config . actions . bar
8888 }
8989 } >
90- type Action < Input = void , Output = any > = TAction < App , Input , Output >
90+ type Action < Input = void , Output = any > = TAction < Config , Input , Output >
9191
9292 const app = new App ( config )
9393
@@ -135,10 +135,10 @@ describe('OPERATORS', () => {
135135 doThis,
136136 } ,
137137 }
138- type IApp = TApp < {
138+ type Config = TConfig < {
139139 actions : typeof config . actions
140140 } >
141- type Action < Input = void , Output = any > = TAction < IApp , Input , Output >
141+ type Action < Input = void , Output = any > = TAction < Config , Input , Output >
142142
143143 const app = new App ( config )
144144
@@ -156,13 +156,13 @@ describe('OPERATORS', () => {
156156 doThis,
157157 } ,
158158 }
159- type IApp = TApp < {
159+ type Config = TConfig < {
160160 state : {
161161 foo : string
162162 }
163163 actions : typeof config . actions
164164 } >
165- type Action < Input = void , Output = any > = TAction < IApp , Input , Output >
165+ type Action < Input = void , Output = any > = TAction < Config , Input , Output >
166166
167167 const app = new App ( config )
168168
@@ -190,7 +190,7 @@ describe('OPERATORS', () => {
190190 doThis,
191191 } ,
192192 }
193- type IApp = TApp < {
193+ type Config = TConfig < {
194194 state : {
195195 foo : string
196196 }
@@ -199,7 +199,7 @@ describe('OPERATORS', () => {
199199 }
200200 actions : typeof config . actions
201201 } >
202- type Action < Input = void , Output = any > = TAction < IApp , Input , Output >
202+ type Action < Input = void , Output = any > = TAction < Config , Input , Output >
203203
204204 const app = new App ( config )
205205 return app . actions
@@ -217,10 +217,10 @@ describe('OPERATORS', () => {
217217 doThis,
218218 } ,
219219 }
220- type IApp = TApp < {
220+ type Config = TConfig < {
221221 actions : typeof config . actions
222222 } >
223- type Action < Input = void , Output = any > = TAction < IApp , Input , Output >
223+ type Action < Input = void , Output = any > = TAction < Config , Input , Output >
224224
225225 const app = new App ( config )
226226
@@ -239,10 +239,10 @@ describe('OPERATORS', () => {
239239 doThis,
240240 } ,
241241 }
242- type IApp = TApp < {
242+ type Config = TConfig < {
243243 actions : typeof config . actions
244244 } >
245- type Action < Input = void , Output = any > = TAction < IApp , Input , Output >
245+ type Action < Input = void , Output = any > = TAction < Config , Input , Output >
246246 const app = new App ( config )
247247
248248 return Promise . resolve ( app . actions . doThis ( ) ) . then ( ( value ) => {
@@ -262,10 +262,10 @@ describe('OPERATORS', () => {
262262 doThis,
263263 } ,
264264 }
265- type IApp = TApp < {
265+ type Config = TConfig < {
266266 actions : typeof config . actions
267267 } >
268- type Action < Input = void , Output = any > = TAction < IApp , Input , Output >
268+ type Action < Input = void , Output = any > = TAction < Config , Input , Output >
269269 const app = new App ( config )
270270 return Promise . resolve ( app . actions . doThis ( ) ) . then ( ( value ) => {
271271 expect ( value ) . toBe ( 'bar' )
@@ -283,10 +283,10 @@ describe('OPERATORS', () => {
283283 doThis,
284284 } ,
285285 }
286- type IApp = TApp < {
286+ type Config = TConfig < {
287287 actions : typeof config . actions
288288 } >
289- type Action < Input = void , Output = any > = TAction < IApp , Input , Output >
289+ type Action < Input = void , Output = any > = TAction < Config , Input , Output >
290290 const app = new App ( config )
291291 expect ( app . actions . doThis ( ) ) . toBe ( 'foo' )
292292 } )
@@ -303,10 +303,10 @@ describe('OPERATORS', () => {
303303 doThis,
304304 } ,
305305 }
306- type IApp = TApp < {
306+ type Config = TConfig < {
307307 actions : typeof config . actions
308308 } >
309- type Action < Input = void , Output = any > = TAction < IApp , Input , Output >
309+ type Action < Input = void , Output = any > = TAction < Config , Input , Output >
310310 const app = new App ( config )
311311
312312 expect ( app . actions . doThis ( ) ) . toBe ( 'bar' )
@@ -321,10 +321,10 @@ describe('OPERATORS', () => {
321321 doThis,
322322 } ,
323323 }
324- type IApp = TApp < {
324+ type Config = TConfig < {
325325 actions : typeof config . actions
326326 } >
327- type Action < Input = void , Output = any > = TAction < IApp , Input , Output >
327+ type Action < Input = void , Output = any > = TAction < Config , Input , Output >
328328 const app = new App ( config )
329329 expect ( app . actions . doThis ( 'foo' ) ) . toBe ( 'bar' )
330330 } )
@@ -337,10 +337,10 @@ describe('OPERATORS', () => {
337337 doThis,
338338 } ,
339339 }
340- type IApp = TApp < {
340+ type Config = TConfig < {
341341 actions : typeof config . actions
342342 } >
343- type Action < Input = void , Output = any > = TAction < IApp , Input , Output >
343+ type Action < Input = void , Output = any > = TAction < Config , Input , Output >
344344 const app = new App ( config )
345345
346346 expect ( app . actions . doThis ( 'foo' ) ) . toEqual ( { value : 'foo' } )
@@ -360,10 +360,10 @@ describe('OPERATORS', () => {
360360 doThis,
361361 } ,
362362 }
363- type IApp = TApp < {
363+ type Config = TConfig < {
364364 actions : typeof config . actions
365365 } >
366- type Action < Input = void , Output = any > = TAction < IApp , Input , Output >
366+ type Action < Input = void , Output = any > = TAction < Config , Input , Output >
367367 const app = new App ( config )
368368
369369 return Promise . resolve ( app . actions . doThis ( ) ) . then ( ( value ) => {
@@ -383,10 +383,10 @@ describe('OPERATORS', () => {
383383 doThis,
384384 } ,
385385 }
386- type IApp = TApp < {
386+ type Config = TConfig < {
387387 actions : typeof config . actions
388388 } >
389- type Action < Input = void , Output = any > = TAction < IApp , Input , Output >
389+ type Action < Input = void , Output = any > = TAction < Config , Input , Output >
390390 const app = new App ( config )
391391 app . actions . doThis ( )
392392 expect ( mockCallback . mock . calls . length ) . toBe ( 1 )
@@ -403,10 +403,10 @@ describe('OPERATORS', () => {
403403 doThis,
404404 } ,
405405 }
406- type IApp = TApp < {
406+ type Config = TConfig < {
407407 actions : typeof config . actions
408408 } >
409- type Action < Input = void , Output = any > = TAction < IApp , Input , Output >
409+ type Action < Input = void , Output = any > = TAction < Config , Input , Output >
410410 const app = new App ( config )
411411 app . actions . doThis ( )
412412 expect ( mockCallback . mock . calls . length ) . toBe ( 1 )
0 commit comments