@@ -85,7 +85,7 @@ export interface TransitionOptions {
85
85
/** @internalapi */
86
86
current ?: ( ) => Transition ;
87
87
/** @internalapi */
88
- source ?: "sref" | "url" | "redirect" | "otherwise" | "unknown" ;
88
+ source ?: "sref" | "url" | "redirect" | "otherwise" | "unknown" ;
89
89
}
90
90
91
91
/** @internalapi */
@@ -171,21 +171,22 @@ export type IHookRegistration = (matchCriteria: HookMatchCriteria, callback: Hoo
171
171
*
172
172
* A transition hook may alter a Transition by returning a [[HookResult]].
173
173
*
174
- * @param transition the current [[Transition]]
175
- * @param injector (for ng1 or ng2 only) the injector service
176
- *
177
- * @returns a [[HookResult]] which may alter the transition
178
- *
179
- * See:
174
+ * #### See:
180
175
*
181
176
* - [[IHookRegistry.onBefore]]
182
177
* - [[IHookRegistry.onStart]]
183
178
* - [[IHookRegistry.onFinish]]
184
179
* - [[IHookRegistry.onSuccess]]
185
180
* - [[IHookRegistry.onError]]
181
+ *
182
+ * @param transition the current [[Transition]]
183
+ * @param injector (for ng1 or ng2 only) the injector service
184
+ *
185
+ * @returns a [[HookResult]] which may alter the transition
186
+ *
186
187
*/
187
188
export interface TransitionHookFn {
188
- ( transition : Transition ) : HookResult
189
+ ( transition : Transition ) : HookResult ;
189
190
}
190
191
191
192
/**
@@ -197,20 +198,20 @@ export interface TransitionHookFn {
197
198
* As a transition runs, it may exit some states, retain (keep) states, and enter states.
198
199
* As each lifecycle event occurs, the hooks which are registered for the event and that state are called (in priority order).
199
200
*
201
+ * #### See:
202
+ *
203
+ * - [[IHookRegistry.onExit]]
204
+ * - [[IHookRegistry.onRetain]]
205
+ * - [[IHookRegistry.onEnter]]
206
+ *
200
207
* @param transition the current [[Transition]]
201
208
* @param state the [[StateObject]] that the hook is bound to
202
209
* @param injector (for ng1 or ng2 only) the injector service
203
210
*
204
211
* @returns a [[HookResult]] which may alter the transition
205
- *
206
- * See:
207
- *
208
- * - [[IHookRegistry.onExit]]
209
- * - [[IHookRegistry.onRetain]]
210
- * - [[IHookRegistry.onEnter]]
211
212
*/
212
213
export interface TransitionStateHookFn {
213
- ( transition : Transition , state : StateDeclaration ) : HookResult
214
+ ( transition : Transition , state : StateDeclaration ) : HookResult ;
214
215
}
215
216
216
217
/**
@@ -223,7 +224,7 @@ export interface TransitionStateHookFn {
223
224
* @return a [[Transition]] which will then be returned from [[TransitionService.create]]
224
225
*/
225
226
export interface TransitionCreateHookFn {
226
- ( transition : Transition ) : void
227
+ ( transition : Transition ) : void ;
227
228
}
228
229
229
230
export type HookFn = ( TransitionHookFn | TransitionStateHookFn | TransitionCreateHookFn ) ;
@@ -351,7 +352,7 @@ export interface IHookRegistry {
351
352
* This example assumes a state tree where all states which require authentication are children of a parent `'requireauth'` state.
352
353
* This example assumes `MyAuthService` synchronously returns a boolean from `isAuthenticated()`.
353
354
*
354
- * @example
355
+ * #### Example:
355
356
* ```js
356
357
* // ng1
357
358
* $transitions.onBefore( { to: 'requireauth.**' }, function(trans) {
@@ -407,7 +408,7 @@ export interface IHookRegistry {
407
408
* - `MyAuthService.authenticate()` presents a login dialog, and returns a promise which is resolved
408
409
* or rejected, whether or not the login attempt was successful.
409
410
*
410
- * @example
411
+ * #### Example:
411
412
* ```js
412
413
* // ng1
413
414
* $transitions.onStart( { to: 'auth.**' }, function(trans) {
@@ -687,16 +688,15 @@ export interface IHookRegistry {
687
688
/**
688
689
* Returns all the registered hooks of a given `hookName` type
689
690
*
690
- * @example
691
+ * #### Example:
691
692
* ```
692
- *
693
693
* $transitions.getHooks("onEnter")
694
694
* ```
695
695
*/
696
696
getHooks ( hookName : string ) : RegisteredHook [ ] ;
697
697
698
698
/** @hidden place to store the hooks */
699
- _registeredHooks : { [ key : string ] : RegisteredHook [ ] }
699
+ _registeredHooks : { [ key : string ] : RegisteredHook [ ] } ;
700
700
}
701
701
702
702
/** A predicate type which tests if a [[StateDeclaration]] passes some test. Returns a boolean. */
@@ -789,13 +789,13 @@ export interface RegisteredHooks {
789
789
790
790
/** @hidden */
791
791
export interface PathTypes {
792
- [ key : string ] : PathType
792
+ [ key : string ] : PathType ;
793
793
794
- to : PathType
795
- from : PathType
796
- exiting : PathType
797
- retained : PathType
798
- entering : PathType
794
+ to : PathType ;
795
+ from : PathType ;
796
+ exiting : PathType ;
797
+ retained : PathType ;
798
+ entering : PathType ;
799
799
}
800
800
801
801
/** @hidden */
0 commit comments