@@ -148,24 +148,19 @@ export class TransitionService implements IHookRegistry {
148
148
const Phase = TransitionHookPhase ;
149
149
const TH = TransitionHook ;
150
150
151
- const to = ( transition : Transition ) =>
152
- transition . treeChanges ( 'to' ) ;
153
- const from = ( transition : Transition ) =>
154
- transition . treeChanges ( 'from' ) ;
155
-
156
151
let hookTypes = [
157
- new TransitionHookType ( "onCreate" , Phase . CREATE , Scope . TRANSITION , 0 , "to" , to , false , TH . IGNORE_RESULT , TH . THROW_ERROR , false ) ,
152
+ new TransitionHookType ( "onCreate" , Phase . CREATE , Scope . TRANSITION , 0 , "to" , false , TH . IGNORE_RESULT , TH . THROW_ERROR , false ) ,
158
153
159
- new TransitionHookType ( "onBefore" , Phase . BEFORE , Scope . TRANSITION , 0 , "to" , to , false , TH . HANDLE_RESULT ) ,
154
+ new TransitionHookType ( "onBefore" , Phase . BEFORE , Scope . TRANSITION , 0 , "to" , false , TH . HANDLE_RESULT ) ,
160
155
161
- new TransitionHookType ( "onStart" , Phase . ASYNC , Scope . TRANSITION , 0 , "to" , to ) ,
162
- new TransitionHookType ( "onExit" , Phase . ASYNC , Scope . STATE , 10 , "exiting" , from , true ) ,
163
- new TransitionHookType ( "onRetain" , Phase . ASYNC , Scope . STATE , 20 , "retained" , to ) ,
164
- new TransitionHookType ( "onEnter" , Phase . ASYNC , Scope . STATE , 30 , "entering" , to ) ,
165
- new TransitionHookType ( "onFinish" , Phase . ASYNC , Scope . TRANSITION , 40 , "to" , to ) ,
156
+ new TransitionHookType ( "onStart" , Phase . ASYNC , Scope . TRANSITION , 0 , "to" ) ,
157
+ new TransitionHookType ( "onExit" , Phase . ASYNC , Scope . STATE , 10 , "exiting" , true ) ,
158
+ new TransitionHookType ( "onRetain" , Phase . ASYNC , Scope . STATE , 20 , "retained" ) ,
159
+ new TransitionHookType ( "onEnter" , Phase . ASYNC , Scope . STATE , 30 , "entering" ) ,
160
+ new TransitionHookType ( "onFinish" , Phase . ASYNC , Scope . TRANSITION , 40 , "to" ) ,
166
161
167
- new TransitionHookType ( "onSuccess" , Phase . SUCCESS , Scope . TRANSITION , 0 , "to" , to , false , TH . IGNORE_RESULT , TH . LOG_ERROR , false ) ,
168
- new TransitionHookType ( "onError" , Phase . ERROR , Scope . TRANSITION , 0 , "to" , to , false , TH . IGNORE_RESULT , TH . LOG_ERROR , false ) ,
162
+ new TransitionHookType ( "onSuccess" , Phase . SUCCESS , Scope . TRANSITION , 0 , "to" , false , TH . IGNORE_RESULT , TH . LOG_ERROR , false ) ,
163
+ new TransitionHookType ( "onError" , Phase . ERROR , Scope . TRANSITION , 0 , "to" , false , TH . IGNORE_RESULT , TH . LOG_ERROR , false ) ,
169
164
] ;
170
165
171
166
hookTypes . forEach ( type => this [ type . name ] = this . registerTransitionHookType ( type ) )
0 commit comments