@angular-wave/angular.ts 0.17.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/@types/angular.d.ts +18 -6
  2. package/@types/animations/animate-css-driver.d.ts +2 -2
  3. package/@types/animations/animate-js-driver.d.ts +21 -3
  4. package/@types/animations/animate-js.d.ts +10 -2
  5. package/@types/animations/animate-swap.d.ts +4 -1
  6. package/@types/animations/animate.d.ts +11 -5
  7. package/@types/animations/animation.d.ts +8 -2
  8. package/@types/animations/css/animate-css.d.ts +16 -0
  9. package/@types/animations/interface.d.ts +315 -21
  10. package/@types/animations/queue/animate-queue.d.ts +17 -8
  11. package/@types/animations/queue/interface.d.ts +14 -7
  12. package/@types/animations/shared.d.ts +1 -1
  13. package/@types/core/compile/attributes.d.ts +5 -5
  14. package/@types/core/compile/compile.d.ts +28 -18
  15. package/@types/core/compile/interface.d.ts +209 -34
  16. package/@types/core/controller/controller.d.ts +30 -38
  17. package/@types/core/controller/interface.d.ts +12 -3
  18. package/@types/core/interpolate/interpolate.d.ts +1 -1
  19. package/@types/core/parse/interface.d.ts +2 -2
  20. package/@types/core/parse/interpreter.d.ts +110 -58
  21. package/@types/core/scope/interface.d.ts +6 -0
  22. package/@types/core/scope/scope.d.ts +2 -1
  23. package/@types/directive/aria/aria.d.ts +67 -27
  24. package/@types/directive/aria/interface.d.ts +9 -0
  25. package/@types/directive/class/class.d.ts +31 -0
  26. package/@types/directive/form/form.d.ts +54 -18
  27. package/@types/directive/input/input.d.ts +59 -18
  28. package/@types/directive/input/interface.d.ts +10 -0
  29. package/@types/directive/messages/messages.d.ts +73 -22
  30. package/@types/directive/model/interface.d.ts +19 -0
  31. package/@types/directive/model/model.d.ts +70 -33
  32. package/@types/directive/model-options/model-options.d.ts +1 -23
  33. package/@types/directive/repeat/repeat.d.ts +2 -3
  34. package/@types/directive/validators/validators.d.ts +1 -5
  35. package/@types/directive/worker/interface.d.ts +9 -0
  36. package/@types/docs.d.ts +24 -0
  37. package/@types/filters/json.d.ts +4 -0
  38. package/@types/interface.d.ts +22 -70
  39. package/@types/namespace.d.ts +73 -53
  40. package/@types/router/common/trace.d.ts +150 -42
  41. package/@types/router/directives/state-directives.d.ts +4 -4
  42. package/@types/router/directives/view-directive.d.ts +4 -7
  43. package/@types/router/hooks/core-resolvables.d.ts +11 -2
  44. package/@types/router/hooks/ignored-transition.d.ts +3 -1
  45. package/@types/router/hooks/invalid-transition.d.ts +3 -1
  46. package/@types/router/hooks/lazy-load.d.ts +17 -13
  47. package/@types/router/hooks/on-enter-exit-retain.d.ts +9 -3
  48. package/@types/router/hooks/redirect-to.d.ts +3 -3
  49. package/@types/router/hooks/resolve.d.ts +11 -3
  50. package/@types/router/hooks/views.d.ts +6 -4
  51. package/@types/router/params/interface.d.ts +3 -2
  52. package/@types/router/params/param-factory.d.ts +24 -3
  53. package/@types/router/params/param-type.d.ts +47 -11
  54. package/@types/router/params/param-types.d.ts +52 -0
  55. package/@types/router/params/param.d.ts +52 -28
  56. package/@types/router/params/state-params.d.ts +5 -3
  57. package/@types/router/path/interface.d.ts +3 -0
  58. package/@types/router/path/path-node.d.ts +34 -14
  59. package/@types/router/path/path-utils.d.ts +75 -25
  60. package/@types/router/resolve/resolvable.d.ts +34 -7
  61. package/@types/router/resolve/resolve-context.d.ts +52 -34
  62. package/@types/router/router.d.ts +10 -12
  63. package/@types/router/state/interface.d.ts +194 -31
  64. package/@types/router/state/state-builder.d.ts +29 -29
  65. package/@types/router/state/state-matcher.d.ts +29 -11
  66. package/@types/router/state/state-object.d.ts +68 -22
  67. package/@types/router/state/state-queue-manager.d.ts +19 -10
  68. package/@types/router/state/state-registry.d.ts +80 -28
  69. package/@types/router/state/state-service.d.ts +182 -123
  70. package/@types/router/state/target-state.d.ts +36 -27
  71. package/@types/router/state/views.d.ts +48 -19
  72. package/@types/router/template-factory.d.ts +8 -15
  73. package/@types/router/transition/hook-builder.d.ts +17 -6
  74. package/@types/router/transition/hook-registry.d.ts +80 -46
  75. package/@types/router/transition/interface.d.ts +138 -118
  76. package/@types/router/transition/reject-factory.d.ts +58 -22
  77. package/@types/router/transition/transition-event-type.d.ts +19 -8
  78. package/@types/router/transition/transition-hook.d.ts +50 -29
  79. package/@types/router/transition/transition-service.d.ts +186 -30
  80. package/@types/router/transition/transition.d.ts +201 -70
  81. package/@types/router/url/interface.d.ts +140 -0
  82. package/@types/router/url/url-config.d.ts +19 -16
  83. package/@types/router/url/url-matcher.d.ts +66 -46
  84. package/@types/router/url/url-rule.d.ts +58 -35
  85. package/@types/router/url/url-rules.d.ts +38 -28
  86. package/@types/router/url/url-service.d.ts +68 -41
  87. package/@types/router/view/interface.d.ts +10 -30
  88. package/@types/router/view/view.d.ts +35 -21
  89. package/@types/services/anchor-scroll/anchor-scroll.d.ts +1 -1
  90. package/@types/services/anchor-scroll/interface.d.ts +5 -8
  91. package/@types/services/http/http.d.ts +20 -23
  92. package/@types/services/http/interface.d.ts +11 -23
  93. package/@types/services/location/interface.d.ts +1 -4
  94. package/@types/services/location/location.d.ts +14 -14
  95. package/@types/services/sce/interface.d.ts +2 -2
  96. package/@types/services/sce/sce.d.ts +16 -10
  97. package/@types/services/template-request/template-request.d.ts +21 -4
  98. package/@types/shared/common.d.ts +5 -32
  99. package/@types/shared/dom.d.ts +10 -5
  100. package/@types/shared/interface.d.ts +4 -0
  101. package/@types/shared/utils.d.ts +17 -6
  102. package/dist/angular-ts.esm.js +6643 -3107
  103. package/dist/angular-ts.umd.js +6643 -3107
  104. package/dist/angular-ts.umd.min.js +1 -1
  105. package/dist/angular-ts.umd.min.js.gz +0 -0
  106. package/dist/angular-ts.umd.min.js.map +1 -1
  107. package/package.json +1 -2
  108. package/@types/animations/animate-css.d.ts +0 -11
  109. package/@types/filters/filters.d.ts +0 -38
  110. package/@types/router/hooks/update-globals.d.ts +0 -1
  111. package/@types/router/hooks/url.d.ts +0 -5
  112. package/@types/router/scroll/interface.d.ts +0 -3
  113. package/@types/router/scroll/view-scroll.d.ts +0 -8
@@ -1,14 +1,18 @@
1
- export namespace defaultTransOpts {
2
- let location: boolean;
3
- let relative: any;
4
- let inherit: boolean;
5
- let notify: boolean;
6
- let reload: boolean;
7
- let supercede: boolean;
8
- let custom: {};
9
- function current(): any;
10
- let source: string;
11
- }
1
+ /** @typedef {import("./interface.ts").DeregisterFn} DeregisterFn */
2
+ /** @typedef {import("./interface.ts").HookFn} HookFn */
3
+ /** @typedef {import("./interface.ts").HookMatchCriteria} HookMatchCriteria */
4
+ /** @typedef {import("./interface.ts").HookRegOptions} HookRegOptions */
5
+ /** @typedef {import("./interface.ts").PathTypes} PathTypes */
6
+ /** @typedef {import("./interface.ts").RegisteredHooks} RegisteredHooks */
7
+ /**
8
+ * The default [[Transition]] options.
9
+ *
10
+ * Include this object when applying custom defaults:
11
+ * let reloadOpts = { reload: true, notify: true }
12
+ * let options = defaults(theirOpts, customDefaults, defaultOptions);
13
+ * @type {import("./interface.ts").TransitionOptions}
14
+ */
15
+ export const defaultTransOpts: import("./interface.ts").TransitionOptions;
12
16
  /**
13
17
  * This class provides services related to Transitions.
14
18
  *
@@ -33,25 +37,31 @@ export class TransitionProvider {
33
37
  $exceptionHandler: ng.ExceptionHandlerProvider,
34
38
  );
35
39
  _transitionCount: number;
36
- /** The transition hook types, such as `onEnter`, `onStart`, etc */
37
- _eventTypes: any[];
40
+ /**
41
+ * The transition hook types, such as `onEnter`, `onStart`, etc
42
+ * @type {TransitionEventType[]}
43
+ */
44
+ _eventTypes: TransitionEventType[];
38
45
  /** @internal The registered transition hooks */
39
- _registeredHooks: {};
46
+ /** @type {RegisteredHooks} */
47
+ _registeredHooks: RegisteredHooks;
40
48
  /** The paths on a criteria object */
41
- _criteriaPaths: {};
49
+ /** @type {PathTypes} */
50
+ _criteriaPaths: PathTypes;
42
51
  globals: import("../router.js").RouterProvider;
43
52
  $view: import("../view/view.js").ViewService;
44
- _deregisterHookFns: {};
53
+ /** @type {Record<string, DeregisterFn | undefined>} */
54
+ _deregisterHookFns: Record<string, DeregisterFn | undefined>;
45
55
  /** @type {ng.ExceptionHandlerService} */
46
56
  _exceptionHandler: ng.ExceptionHandlerService;
47
57
  $get: (
48
58
  | string
49
59
  | ((
50
- stateService: any,
51
- urlService: any,
52
- stateRegistry: any,
53
- viewService: any,
54
- ) => this)
60
+ stateService: ng.StateService,
61
+ urlService: ng.UrlService,
62
+ stateRegistry: ng.StateRegistryService,
63
+ viewService: ng.ViewService,
64
+ ) => TransitionProvider)
55
65
  )[];
56
66
  /**
57
67
  * Registers a [[TransitionHookFn]], called *while a transition is being constructed*.
@@ -87,16 +97,31 @@ export class TransitionProvider {
87
97
  * @param targetState the target state (destination)
88
98
  * @returns a Transition
89
99
  */
90
- create(fromPath: any, targetState: any): Transition;
100
+ /**
101
+ * @param {import("../path/path-node.js").PathNode[]} fromPath
102
+ * @param {import("../state/target-state.js").TargetState} targetState
103
+ */
104
+ create(
105
+ fromPath: import("../path/path-node.js").PathNode[],
106
+ targetState: import("../state/target-state.js").TargetState,
107
+ ): Transition;
91
108
  _defineCoreEvents(): void;
92
109
  _defineCorePaths(): void;
110
+ /**
111
+ * @param {string} name
112
+ * @param {number} hookPhase
113
+ * @param {number} hookOrder
114
+ * @param {any} criteriaMatchPath
115
+ */
93
116
  _defineEvent(
94
- name: any,
95
- hookPhase: any,
96
- hookOrder: any,
117
+ name: string,
118
+ hookPhase: number,
119
+ hookOrder: number,
97
120
  criteriaMatchPath: any,
98
121
  reverseSort?: boolean,
99
- getResultHandler?: (hook: any) => (result: any) => any,
122
+ getResultHandler?: (
123
+ hook: TransitionHook,
124
+ ) => (result: import("./transition-hook.js").HookResult) => Promise<any>,
100
125
  getErrorHandler?: () => (error: any) => Promise<never>,
101
126
  synchronous?: boolean,
102
127
  ): void;
@@ -115,13 +140,144 @@ export class TransitionProvider {
115
140
  * Another example: the `to` path in [[HookMatchCriteria]] is a TRANSITION scoped path.
116
141
  * It was defined by calling `defineTreeChangesCriterion('to', TransitionHookScope.TRANSITION)`
117
142
  * Only the tail of the `to` path is checked against the criteria and returned as part of the match.
118
- *
119
143
  * @internal
144
+ * @param {string} name
145
+ * @param {number} hookScope
146
+ */
147
+ _definePathType(name: string, hookScope: number): void;
148
+ _getPathTypes(): import("./interface.ts").PathTypes;
149
+ /**
150
+ * @param {string} hookName
151
+ * @returns {import("./hook-registry.js").RegisteredHook[]}
152
+ */
153
+ getHooks(hookName: string): import("./hook-registry.js").RegisteredHook[];
154
+ /**
155
+ * Registers a hook by event name.
156
+ * @param {string} eventName
157
+ * @param {HookMatchCriteria} matchCriteria
158
+ * @param {HookFn} callback
159
+ * @param {HookRegOptions} [options]
160
+ * @returns {DeregisterFn}
161
+ */
162
+ on(
163
+ eventName: string,
164
+ matchCriteria: HookMatchCriteria,
165
+ callback: HookFn,
166
+ options?: HookRegOptions,
167
+ ): DeregisterFn;
168
+ /**
169
+ * @param {HookMatchCriteria} matchCriteria
170
+ * @param {HookFn} callback
171
+ * @param {HookRegOptions} [options]
172
+ * @returns {DeregisterFn}
173
+ */
174
+ onCreate(
175
+ matchCriteria: HookMatchCriteria,
176
+ callback: HookFn,
177
+ options?: HookRegOptions,
178
+ ): DeregisterFn;
179
+ /**
180
+ * @param {HookMatchCriteria} matchCriteria
181
+ * @param {HookFn} callback
182
+ * @param {HookRegOptions} [options]
183
+ * @returns {DeregisterFn}
184
+ */
185
+ onBefore(
186
+ matchCriteria: HookMatchCriteria,
187
+ callback: HookFn,
188
+ options?: HookRegOptions,
189
+ ): DeregisterFn;
190
+ /**
191
+ * @param {HookMatchCriteria} matchCriteria
192
+ * @param {HookFn} callback
193
+ * @param {HookRegOptions} [options]
194
+ * @returns {DeregisterFn}
195
+ */
196
+ onStart(
197
+ matchCriteria: HookMatchCriteria,
198
+ callback: HookFn,
199
+ options?: HookRegOptions,
200
+ ): DeregisterFn;
201
+ /**
202
+ * @param {HookMatchCriteria} matchCriteria
203
+ * @param {HookFn} callback
204
+ * @param {HookRegOptions} [options]
205
+ * @returns {DeregisterFn}
206
+ */
207
+ onEnter(
208
+ matchCriteria: HookMatchCriteria,
209
+ callback: HookFn,
210
+ options?: HookRegOptions,
211
+ ): DeregisterFn;
212
+ /**
213
+ * @param {HookMatchCriteria} matchCriteria
214
+ * @param {HookFn} callback
215
+ * @param {HookRegOptions} [options]
216
+ * @returns {DeregisterFn}
217
+ */
218
+ onRetain(
219
+ matchCriteria: HookMatchCriteria,
220
+ callback: HookFn,
221
+ options?: HookRegOptions,
222
+ ): DeregisterFn;
223
+ /**
224
+ * @param {HookMatchCriteria} matchCriteria
225
+ * @param {HookFn} callback
226
+ * @param {HookRegOptions} [options]
227
+ * @returns {DeregisterFn}
228
+ */
229
+ onExit(
230
+ matchCriteria: HookMatchCriteria,
231
+ callback: HookFn,
232
+ options?: HookRegOptions,
233
+ ): DeregisterFn;
234
+ /**
235
+ * @param {HookMatchCriteria} matchCriteria
236
+ * @param {HookFn} callback
237
+ * @param {HookRegOptions} [options]
238
+ * @returns {DeregisterFn}
239
+ */
240
+ onFinish(
241
+ matchCriteria: HookMatchCriteria,
242
+ callback: HookFn,
243
+ options?: HookRegOptions,
244
+ ): DeregisterFn;
245
+ /**
246
+ * @param {HookMatchCriteria} matchCriteria
247
+ * @param {HookFn} callback
248
+ * @param {HookRegOptions} [options]
249
+ * @returns {DeregisterFn}
250
+ */
251
+ onSuccess(
252
+ matchCriteria: HookMatchCriteria,
253
+ callback: HookFn,
254
+ options?: HookRegOptions,
255
+ ): DeregisterFn;
256
+ /**
257
+ * @param {HookMatchCriteria} matchCriteria
258
+ * @param {HookFn} callback
259
+ * @param {HookRegOptions} [options]
260
+ * @returns {DeregisterFn}
261
+ */
262
+ onError(
263
+ matchCriteria: HookMatchCriteria,
264
+ callback: HookFn,
265
+ options?: HookRegOptions,
266
+ ): DeregisterFn;
267
+ /**
268
+ * @param {string} eventName
269
+ * @returns {TransitionEventType}
120
270
  */
121
- _definePathType(name: any, hookScope: any): void;
122
- _getPathTypes(): {};
123
- getHooks(hookName: any): any;
271
+ _getEventType(eventName: string): TransitionEventType;
124
272
  _registerCoreTransitionHooks(): void;
125
273
  }
274
+ export type DeregisterFn = import("./interface.ts").DeregisterFn;
275
+ export type HookFn = import("./interface.ts").HookFn;
276
+ export type HookMatchCriteria = import("./interface.ts").HookMatchCriteria;
277
+ export type HookRegOptions = import("./interface.ts").HookRegOptions;
278
+ export type PathTypes = import("./interface.ts").PathTypes;
279
+ export type RegisteredHooks = import("./interface.ts").RegisteredHooks;
280
+ import { TransitionEventType } from "./transition-event-type.js";
126
281
  import { Transition } from "./transition.js";
282
+ import { TransitionHook } from "./transition-hook.js";
127
283
  import { TransitionHookPhase } from "./transition-hook.js";
@@ -5,7 +5,6 @@
5
5
  *
6
6
  * This object contains all contextual information about the to/from states, parameters, resolves.
7
7
  * It has information about all states being entered and exited as a result of the transition.
8
- * @extends {HookRegistry}
9
8
  */
10
9
  export class Transition {
11
10
  /**
@@ -13,24 +12,23 @@ export class Transition {
13
12
  *
14
13
  * If the target state is not valid, an error is thrown.
15
14
  *
16
- * @param {Array<import('../path/path-node.js').PathNode>} fromPath The path of [[PathNode]]s from which the transition is leaving. The last node in the `fromPath`
15
+ * @param {Array<PathNode>} fromPath The path of [[PathNode]]s from which the transition is leaving. The last node in the `fromPath`
17
16
  * encapsulates the "from state".
18
- * @param {import('../state/target-state.js').TargetState} targetState The target state and parameters being transitioned to (also, the transition options)
19
- * @param {ng.TransitionProvider} transitionService The [[TransitionService]] instance
17
+ * @param {TargetState} targetState The target state and parameters being transitioned to (also, the transition options)
18
+ * @param {import("./transition-service.js").TransitionProvider} transitionService
20
19
  * @param {ng.RouterService} globals
21
20
  */
22
21
  constructor(
23
- fromPath: Array<import("../path/path-node.js").PathNode>,
24
- targetState: import("../state/target-state.js").TargetState,
25
- transitionService: ng.TransitionProvider,
22
+ fromPath: Array<PathNode>,
23
+ targetState: TargetState,
24
+ transitionService: import("./transition-service.js").TransitionProvider,
26
25
  globals: ng.RouterService,
27
26
  );
28
27
  /**
29
28
  * @type {import('../router.js').RouterProvider}
30
29
  */
31
30
  _globals: import("../router.js").RouterProvider;
32
- /** @type {ng.TransitionProvider} */
33
- _transitionProvider: ng.TransitionProvider;
31
+ _transitionService: import("./transition-service.js").TransitionProvider;
34
32
  /** @type {PromiseWithResolvers<any>} */
35
33
  _deferred: PromiseWithResolvers<any>;
36
34
  /**
@@ -40,71 +38,169 @@ export class Transition {
40
38
  * When the transition is unsuccessful, the promise is rejected with the [[Rejection]] or javascript error
41
39
  */
42
40
  promise: any;
43
- /** @internal Holds the hook registration functions such as those passed to Transition.onStart() */
44
- _registeredHooks: {};
41
+ /** @type {RegisteredHooks} Holds the hook registration functions such as those passed to Transition.onStart() */
42
+ _registeredHooks: RegisteredHooks;
43
+ /** @type {HookBuilder} */
45
44
  _hookBuilder: HookBuilder;
46
45
  /** Checks if this transition is currently active/running. */
46
+ /** @type {() => boolean} */
47
47
  isActive: () => boolean;
48
48
  _targetState: import("../state/target-state.js").TargetState;
49
49
  _options: any;
50
50
  $id: number;
51
- _treeChanges: import("./interface.ts").TreeChanges;
52
- onStart: any;
53
- onBefore: any;
54
- onSuccess: any;
55
- onEnter: any;
56
- onRetain: any;
57
- onExit: any;
58
- onFinish: any;
59
- onError: any;
60
- /**
61
- * Creates the transition-level hook registration functions
62
- * (which can then be used to register hooks)
63
- */
64
- createTransitionHookRegFns(): void;
65
- getHooks(hookName: any): any;
51
+ /** @type {TreeChanges} */
52
+ _treeChanges: TreeChanges;
53
+ /**
54
+ * @param {string} hookName
55
+ * @returns {RegisteredHook[]}
56
+ */
57
+ getHooks(hookName: string): RegisteredHook[];
58
+ /**
59
+ * Registers a hook by event name.
60
+ * @param {string} eventName
61
+ * @param {HookMatchCriteria} matchCriteria
62
+ * @param {HookFn} callback
63
+ * @param {HookRegOptions} [options]
64
+ * @returns {DeregisterFn}
65
+ */
66
+ on(
67
+ eventName: string,
68
+ matchCriteria: HookMatchCriteria,
69
+ callback: HookFn,
70
+ options?: HookRegOptions,
71
+ ): DeregisterFn;
72
+ /**
73
+ * @param {HookMatchCriteria} matchCriteria
74
+ * @param {HookFn} callback
75
+ * @param {HookRegOptions} [options]
76
+ * @returns {DeregisterFn}
77
+ */
78
+ onBefore(
79
+ matchCriteria: HookMatchCriteria,
80
+ callback: HookFn,
81
+ options?: HookRegOptions,
82
+ ): DeregisterFn;
83
+ /**
84
+ * @param {HookMatchCriteria} matchCriteria
85
+ * @param {HookFn} callback
86
+ * @param {HookRegOptions} [options]
87
+ * @returns {DeregisterFn}
88
+ */
89
+ onStart(
90
+ matchCriteria: HookMatchCriteria,
91
+ callback: HookFn,
92
+ options?: HookRegOptions,
93
+ ): DeregisterFn;
94
+ /**
95
+ * @param {HookMatchCriteria} matchCriteria
96
+ * @param {HookFn} callback
97
+ * @param {HookRegOptions} [options]
98
+ * @returns {DeregisterFn}
99
+ */
100
+ onEnter(
101
+ matchCriteria: HookMatchCriteria,
102
+ callback: HookFn,
103
+ options?: HookRegOptions,
104
+ ): DeregisterFn;
105
+ /**
106
+ * @param {HookMatchCriteria} matchCriteria
107
+ * @param {HookFn} callback
108
+ * @param {HookRegOptions} [options]
109
+ * @returns {DeregisterFn}
110
+ */
111
+ onRetain(
112
+ matchCriteria: HookMatchCriteria,
113
+ callback: HookFn,
114
+ options?: HookRegOptions,
115
+ ): DeregisterFn;
116
+ /**
117
+ * @param {HookMatchCriteria} matchCriteria
118
+ * @param {HookFn} callback
119
+ * @param {HookRegOptions} [options]
120
+ * @returns {DeregisterFn}
121
+ */
122
+ onExit(
123
+ matchCriteria: HookMatchCriteria,
124
+ callback: HookFn,
125
+ options?: HookRegOptions,
126
+ ): DeregisterFn;
127
+ /**
128
+ * @param {HookMatchCriteria} matchCriteria
129
+ * @param {HookFn} callback
130
+ * @param {HookRegOptions} [options]
131
+ * @returns {DeregisterFn}
132
+ */
133
+ onFinish(
134
+ matchCriteria: HookMatchCriteria,
135
+ callback: HookFn,
136
+ options?: HookRegOptions,
137
+ ): DeregisterFn;
138
+ /**
139
+ * @param {HookMatchCriteria} matchCriteria
140
+ * @param {HookFn} callback
141
+ * @param {HookRegOptions} [options]
142
+ * @returns {DeregisterFn}
143
+ */
144
+ onSuccess(
145
+ matchCriteria: HookMatchCriteria,
146
+ callback: HookFn,
147
+ options?: HookRegOptions,
148
+ ): DeregisterFn;
149
+ /**
150
+ * @param {HookMatchCriteria} matchCriteria
151
+ * @param {HookFn} callback
152
+ * @param {HookRegOptions} [options]
153
+ * @returns {DeregisterFn}
154
+ */
155
+ onError(
156
+ matchCriteria: HookMatchCriteria,
157
+ callback: HookFn,
158
+ options?: HookRegOptions,
159
+ ): DeregisterFn;
160
+ /**
161
+ * @param {string} eventName
162
+ * @returns {import("./transition-event-type.js").TransitionEventType}
163
+ */
164
+ _getEventType(
165
+ eventName: string,
166
+ ): import("./transition-event-type.js").TransitionEventType;
66
167
  applyViewConfigs(): void;
67
168
  /**
68
- * @returns {import('../state/state-object.js').StateObject} the internal from [State] object
169
+ * @returns {StateObject} the internal from [State] object
69
170
  */
70
- $from(): import("../state/state-object.js").StateObject;
171
+ $from(): StateObject;
71
172
  /**
72
- * @returns {import('../state/state-object.js').StateObject} the internal to [State] object
173
+ * @returns {StateObject} the internal to [State] object
73
174
  */
74
- $to(): import("../state/state-object.js").StateObject;
175
+ $to(): StateObject;
75
176
  /**
76
177
  * Returns the "from state"
77
178
  *
78
179
  * Returns the state that the transition is coming *from*.
79
180
  *
80
- * @returns The state declaration object for the Transition's ("from state").
181
+ * @returns {StateDeclaration} The state declaration object for the Transition's ("from state").
81
182
  */
82
- from():
83
- | import("../state/interface.ts").StateDeclaration
84
- | import("../state/interface.ts").BuiltStateDeclaration;
183
+ from(): StateDeclaration;
85
184
  /**
86
185
  * Returns the "to state"
87
186
  *
88
187
  * Returns the state that the transition is going *to*.
89
188
  *
90
- * @returns The state declaration object for the Transition's target state ("to state").
189
+ * @returns {StateDeclaration} The state declaration object for the Transition's target state ("to state").
91
190
  */
92
- to():
93
- | import("../state/interface.ts").StateDeclaration
94
- | import("../state/interface.ts").BuiltStateDeclaration;
191
+ to(): StateDeclaration;
95
192
  /**
96
193
  * Gets the Target State
97
194
  *
98
195
  * A transition's [[TargetState]] encapsulates the [[to]] state, the [[params]], and the [[options]] as a single object.
99
196
  *
100
- * @returns the [[TargetState]] of this Transition
197
+ * @returns {TargetState} the [[TargetState]] of this Transition
101
198
  */
102
- targetState(): import("../state/target-state.js").TargetState;
199
+ targetState(): TargetState;
103
200
  /**
104
- * Determines whether two transitions are equivalent.
105
- * @deprecated
201
+ * @param {string} pathname
202
+ * @returns {any}
106
203
  */
107
- is(compare: any): any;
108
204
  params(pathname?: string): any;
109
205
  /**
110
206
  * Gets all available resolve tokens (keys)
@@ -165,10 +261,15 @@ export class Transition {
165
261
  * });
166
262
  * ```
167
263
  *
168
- * @param resolvable a [[ResolvableLiteral]] object (or a [[Resolvable]])
169
- * @param state the state in the "to path" which should receive the new resolve (otherwise, the root state)
264
+ * @param {Resolvable | import("../resolve/interface.ts").ResolvableLiteral} resolvable a [[ResolvableLiteral]] object (or a [[Resolvable]])
265
+ * @param {import("../state/interface.ts").StateOrName} state the state in the "to path" which should receive the new resolve (otherwise, the root state)
170
266
  */
171
- addResolvable(resolvable: any, state: any): void;
267
+ addResolvable(
268
+ resolvable:
269
+ | Resolvable
270
+ | import("../resolve/interface.ts").ResolvableLiteral,
271
+ state: import("../state/interface.ts").StateOrName,
272
+ ): void;
172
273
  /**
173
274
  * Gets the transition from which this transition was redirected.
174
275
  *
@@ -184,9 +285,9 @@ export class Transition {
184
285
  * });
185
286
  * ```
186
287
  *
187
- * @returns The previous Transition, or null if this Transition is not the result of a redirection
288
+ * @returns {Transition} The previous Transition, or null if this Transition is not the result of a redirection
188
289
  */
189
- redirectedFrom(): any;
290
+ redirectedFrom(): Transition;
190
291
  /**
191
292
  * Gets the original transition in a redirect chain
192
293
  *
@@ -211,34 +312,34 @@ export class Transition {
211
312
  * });
212
313
  * ```
213
314
  *
214
- * @returns The original Transition that started a redirect chain
315
+ * @returns {Transition} The original Transition that started a redirect chain
215
316
  */
216
- originalTransition(): any;
317
+ originalTransition(): Transition;
217
318
  /**
218
319
  * Get the transition options
219
320
  *
220
- * @returns the options for this Transition.
321
+ * @returns {import("./interface.ts").TransitionOptions} the options for this Transition.
221
322
  */
222
- options(): any;
323
+ options(): import("./interface.ts").TransitionOptions;
223
324
  /**
224
325
  * Gets the states being entered.
225
326
  *
226
327
  * @returns an array of states that will be entered during this transition.
227
328
  */
228
- entering(): any;
329
+ entering(): import("../state/interface.ts").StateDeclaration[];
229
330
  /**
230
331
  * Gets the states being exited.
231
332
  *
232
- * @returns an array of states that will be exited during this transition.
333
+ * @returns {import("../state/interface.ts").StateDeclaration[]} an array of states that will be exited during this transition.
233
334
  */
234
- exiting(): any;
335
+ exiting(): import("../state/interface.ts").StateDeclaration[];
235
336
  /**
236
337
  * Gets the states being retained.
237
338
  *
238
- * @returns an array of states that are already entered from a previous Transition, that will not be
339
+ * @returns {import("../state/interface.ts").StateDeclaration[]} an array of states that are already entered from a previous Transition, that will not be
239
340
  * exited during this Transition
240
341
  */
241
- retained(): any;
342
+ retained(): import("../state/interface.ts").StateDeclaration[];
242
343
  /**
243
344
  * Get the [[ViewConfig]]s associated with this Transition
244
345
  *
@@ -247,13 +348,29 @@ export class Transition {
247
348
  *
248
349
  * @param pathname the name of the path to fetch views for:
249
350
  * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`)
250
- * @param state If provided, only returns the `ViewConfig`s for a single state in the path
351
+ * @param {ng.StateObject} [state] If provided, only returns the `ViewConfig`s for a single state in the path
251
352
  *
252
- * @returns a list of ViewConfig objects for the given path.
353
+ * @returns {import("../state/views.js").ViewConfig[]} a list of ViewConfig objects for the given path.
354
+ */
355
+ views(
356
+ pathname?: string,
357
+ state?: ng.StateObject,
358
+ ): import("../state/views.js").ViewConfig[];
359
+ /**
360
+ * Return the transition's tree changes
361
+ *
362
+ * A transition goes from one state/parameters to another state/parameters.
363
+ * During a transition, states are entered and/or exited.
364
+ *
365
+ * This function returns various branches (paths) which represent the changes to the
366
+ * active state tree that are caused by the transition.
367
+ *
368
+ * @param {string} [pathname] The name of the tree changes path to get:
369
+ * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`)
370
+ * @returns {import('../path/path-node.js').PathNode[] | import("./interface.ts").TreeChanges}
253
371
  */
254
- views(pathname: string, state: any): any;
255
372
  treeChanges(
256
- pathname: any,
373
+ pathname?: string,
257
374
  ):
258
375
  | import("../path/path-node.js").PathNode[]
259
376
  | import("./interface.ts").TreeChanges;
@@ -263,11 +380,11 @@ export class Transition {
263
380
  * This transition can be returned from a [[TransitionService]] hook to
264
381
  * redirect a transition to a new state and/or set of parameters.
265
382
  *
266
- * @internal
383
+ * @param {TargetState} targetState the new target state for the redirected transition
267
384
  *
268
- * @returns Returns a new [[Transition]] instance.
385
+ * @returns {Transition} Returns a new [[Transition]] instance.
269
386
  */
270
- redirect(targetState: any): Transition;
387
+ redirect(targetState: TargetState): Transition;
271
388
  /** @internal If a transition doesn't exit/enter any states, returns any [[Param]] whose value changed */
272
389
  _changedParams(): any;
273
390
  /**
@@ -275,9 +392,9 @@ export class Transition {
275
392
  *
276
393
  * A transition is dynamic if no states are entered nor exited, but at least one dynamic parameter has changed.
277
394
  *
278
- * @returns true if the Transition is dynamic
395
+ * @returns {boolean} true if the Transition is dynamic
279
396
  */
280
- dynamic(): any;
397
+ dynamic(): boolean;
281
398
  /**
282
399
  * Returns true if the transition is ignored.
283
400
  *
@@ -294,11 +411,11 @@ export class Transition {
294
411
  *
295
412
  * @internal
296
413
  *
297
- * @returns {Promise} a promise for a successful transition.
414
+ * @returns {Promise<any>} a promise for a successful transition.
298
415
  */
299
416
  run(): Promise<any>;
300
417
  success: boolean;
301
- _error: any;
418
+ _error: Rejection;
302
419
  /**
303
420
  * Checks if the Transition is valid
304
421
  *
@@ -321,7 +438,7 @@ export class Transition {
321
438
  *
322
439
  * @returns a transition rejection explaining why the transition is invalid, or the reason the transition failed.
323
440
  */
324
- error(): any;
441
+ error(): Rejection;
325
442
  /**
326
443
  * A string representation of the Transition
327
444
  *
@@ -332,5 +449,19 @@ export class Transition {
332
449
  export namespace Transition {
333
450
  export { Transition as diToken };
334
451
  }
335
- export type HookRegistry = import("./interface.ts").HookRegistry;
452
+ export type DeregisterFn = import("./interface.ts").DeregisterFn;
453
+ export type HookFn = import("./interface.ts").HookFn;
454
+ export type HookMatchCriteria = import("./interface.ts").HookMatchCriteria;
455
+ export type HookRegOptions = import("./interface.ts").HookRegOptions;
456
+ export type BuiltStateDeclaration =
457
+ import("../state/interface.ts").BuiltStateDeclaration;
458
+ export type RegisteredHooks = import("./interface.ts").RegisteredHooks;
459
+ export type RegisteredHook = import("./hook-registry.js").RegisteredHook;
460
+ export type TargetState = import("../state/target-state.js").TargetState;
461
+ export type TreeChanges = import("../transition/interface.ts").TreeChanges;
462
+ export type PathNode = import("../path/path-node.js").PathNode;
463
+ export type StateObject = import("../state/state-object.js").StateObject;
464
+ export type StateDeclaration = import("../state/interface.ts").StateDeclaration;
336
465
  import { HookBuilder } from "./hook-builder.js";
466
+ import { Resolvable } from "../resolve/resolvable.js";
467
+ import { Rejection } from "./reject-factory.js";