Skip to content

Commit fe8505e

Browse files
chore(lint): Lint the transition interface file
1 parent b019036 commit fe8505e

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

src/transition/interface.ts

+27-27
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export interface TransitionOptions {
8585
/** @internalapi */
8686
current ?: () => Transition;
8787
/** @internalapi */
88-
source ?: "sref"|"url"|"redirect"|"otherwise"|"unknown";
88+
source ?: "sref" | "url" | "redirect" | "otherwise" | "unknown";
8989
}
9090

9191
/** @internalapi */
@@ -171,21 +171,22 @@ export type IHookRegistration = (matchCriteria: HookMatchCriteria, callback: Hoo
171171
*
172172
* A transition hook may alter a Transition by returning a [[HookResult]].
173173
*
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:
180175
*
181176
* - [[IHookRegistry.onBefore]]
182177
* - [[IHookRegistry.onStart]]
183178
* - [[IHookRegistry.onFinish]]
184179
* - [[IHookRegistry.onSuccess]]
185180
* - [[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+
*
186187
*/
187188
export interface TransitionHookFn {
188-
(transition: Transition) : HookResult
189+
(transition: Transition) : HookResult;
189190
}
190191

191192
/**
@@ -197,20 +198,20 @@ export interface TransitionHookFn {
197198
* As a transition runs, it may exit some states, retain (keep) states, and enter states.
198199
* As each lifecycle event occurs, the hooks which are registered for the event and that state are called (in priority order).
199200
*
201+
* #### See:
202+
*
203+
* - [[IHookRegistry.onExit]]
204+
* - [[IHookRegistry.onRetain]]
205+
* - [[IHookRegistry.onEnter]]
206+
*
200207
* @param transition the current [[Transition]]
201208
* @param state the [[StateObject]] that the hook is bound to
202209
* @param injector (for ng1 or ng2 only) the injector service
203210
*
204211
* @returns a [[HookResult]] which may alter the transition
205-
*
206-
* See:
207-
*
208-
* - [[IHookRegistry.onExit]]
209-
* - [[IHookRegistry.onRetain]]
210-
* - [[IHookRegistry.onEnter]]
211212
*/
212213
export interface TransitionStateHookFn {
213-
(transition: Transition, state: StateDeclaration) : HookResult
214+
(transition: Transition, state: StateDeclaration) : HookResult;
214215
}
215216

216217
/**
@@ -223,7 +224,7 @@ export interface TransitionStateHookFn {
223224
* @return a [[Transition]] which will then be returned from [[TransitionService.create]]
224225
*/
225226
export interface TransitionCreateHookFn {
226-
(transition: Transition): void
227+
(transition: Transition): void;
227228
}
228229

229230
export type HookFn = (TransitionHookFn|TransitionStateHookFn|TransitionCreateHookFn);
@@ -351,7 +352,7 @@ export interface IHookRegistry {
351352
* This example assumes a state tree where all states which require authentication are children of a parent `'requireauth'` state.
352353
* This example assumes `MyAuthService` synchronously returns a boolean from `isAuthenticated()`.
353354
*
354-
* @example
355+
* #### Example:
355356
* ```js
356357
* // ng1
357358
* $transitions.onBefore( { to: 'requireauth.**' }, function(trans) {
@@ -407,7 +408,7 @@ export interface IHookRegistry {
407408
* - `MyAuthService.authenticate()` presents a login dialog, and returns a promise which is resolved
408409
* or rejected, whether or not the login attempt was successful.
409410
*
410-
* @example
411+
* #### Example:
411412
* ```js
412413
* // ng1
413414
* $transitions.onStart( { to: 'auth.**' }, function(trans) {
@@ -687,16 +688,15 @@ export interface IHookRegistry {
687688
/**
688689
* Returns all the registered hooks of a given `hookName` type
689690
*
690-
* @example
691+
* #### Example:
691692
* ```
692-
*
693693
* $transitions.getHooks("onEnter")
694694
* ```
695695
*/
696696
getHooks(hookName: string): RegisteredHook[];
697697

698698
/** @hidden place to store the hooks */
699-
_registeredHooks: { [key: string]: RegisteredHook[] }
699+
_registeredHooks: { [key: string]: RegisteredHook[] };
700700
}
701701

702702
/** A predicate type which tests if a [[StateDeclaration]] passes some test. Returns a boolean. */
@@ -789,13 +789,13 @@ export interface RegisteredHooks {
789789

790790
/** @hidden */
791791
export interface PathTypes {
792-
[key: string]: PathType
792+
[key: string]: PathType;
793793

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;
799799
}
800800

801801
/** @hidden */

0 commit comments

Comments
 (0)