@@ -8,6 +8,14 @@ import {
88// NOTE: there is a lot of repetition here :(
99// Repetition will be less when ember-statecharts _is_ TS?
1010
11+ export type UpdateFnArg = {
12+ machine : StateMachine < Context , Schema , Events > ;
13+ context : Context ;
14+ config : MachineConfig < Context , Schema , Events > ;
15+ send : Send < Context , Schema , Events > ;
16+ restart : ( ) => void ;
17+ } ;
18+ export type UpdateFn = ( arg : UpdateFnArg ) => void ;
1119
1220// Private Types
1321// For building the Public Types?
@@ -24,6 +32,7 @@ type InterpretedUsable<Context, Schema, Events extends EventObject> = {
2432 service : Interpreter < Context , Schema , Events > ;
2533 withConfig : ( ...args : WithConfigParams < Context , Schema , Events > ) => InterpretedUsable < Context , Schema , Events > ;
2634 withContext : ( ...args : WithContextParams < Context , Schema , Events > ) => InterpretedUsable < Context , Schema , Events > ;
35+ update : ( fn : UpdateFn ) => InterpretedUsable < Context , Schema , Events > ;
2736}
2837
2938type UsableStatechart < Context , Schema , Events extends EventObject > =
0 commit comments