@angular-wave/angular.ts 0.18.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 (107) 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 +11 -1
  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 +7 -0
  8. package/@types/animations/css/animate-css.d.ts +16 -0
  9. package/@types/animations/interface.d.ts +308 -19
  10. package/@types/animations/queue/animate-queue.d.ts +16 -7
  11. package/@types/animations/queue/interface.d.ts +14 -7
  12. package/@types/core/compile/attributes.d.ts +1 -1
  13. package/@types/core/compile/compile.d.ts +25 -15
  14. package/@types/core/compile/interface.d.ts +209 -34
  15. package/@types/core/controller/controller.d.ts +30 -38
  16. package/@types/core/controller/interface.d.ts +12 -3
  17. package/@types/core/parse/interface.d.ts +2 -2
  18. package/@types/core/parse/interpreter.d.ts +110 -58
  19. package/@types/core/scope/interface.d.ts +6 -0
  20. package/@types/core/scope/scope.d.ts +2 -1
  21. package/@types/directive/aria/aria.d.ts +66 -26
  22. package/@types/directive/aria/interface.d.ts +9 -0
  23. package/@types/directive/class/class.d.ts +31 -0
  24. package/@types/directive/form/form.d.ts +54 -18
  25. package/@types/directive/input/input.d.ts +59 -18
  26. package/@types/directive/input/interface.d.ts +10 -0
  27. package/@types/directive/messages/messages.d.ts +63 -12
  28. package/@types/directive/model/interface.d.ts +19 -0
  29. package/@types/directive/model/model.d.ts +70 -33
  30. package/@types/directive/model-options/model-options.d.ts +1 -23
  31. package/@types/directive/repeat/repeat.d.ts +2 -3
  32. package/@types/directive/validators/validators.d.ts +1 -5
  33. package/@types/directive/worker/interface.d.ts +9 -0
  34. package/@types/docs.d.ts +24 -0
  35. package/@types/filters/json.d.ts +4 -0
  36. package/@types/interface.d.ts +22 -69
  37. package/@types/namespace.d.ts +66 -40
  38. package/@types/router/common/trace.d.ts +150 -42
  39. package/@types/router/directives/state-directives.d.ts +4 -4
  40. package/@types/router/directives/view-directive.d.ts +2 -5
  41. package/@types/router/hooks/core-resolvables.d.ts +11 -2
  42. package/@types/router/hooks/ignored-transition.d.ts +3 -1
  43. package/@types/router/hooks/invalid-transition.d.ts +3 -1
  44. package/@types/router/hooks/lazy-load.d.ts +17 -13
  45. package/@types/router/hooks/on-enter-exit-retain.d.ts +9 -3
  46. package/@types/router/hooks/redirect-to.d.ts +3 -3
  47. package/@types/router/hooks/resolve.d.ts +11 -3
  48. package/@types/router/hooks/views.d.ts +6 -4
  49. package/@types/router/params/interface.d.ts +3 -2
  50. package/@types/router/params/param-factory.d.ts +24 -3
  51. package/@types/router/params/param-type.d.ts +47 -11
  52. package/@types/router/params/param-types.d.ts +52 -0
  53. package/@types/router/params/param.d.ts +52 -28
  54. package/@types/router/params/state-params.d.ts +5 -3
  55. package/@types/router/path/interface.d.ts +3 -0
  56. package/@types/router/path/path-node.d.ts +34 -14
  57. package/@types/router/path/path-utils.d.ts +75 -25
  58. package/@types/router/resolve/resolvable.d.ts +34 -7
  59. package/@types/router/resolve/resolve-context.d.ts +52 -34
  60. package/@types/router/router.d.ts +10 -12
  61. package/@types/router/state/interface.d.ts +194 -31
  62. package/@types/router/state/state-builder.d.ts +29 -29
  63. package/@types/router/state/state-matcher.d.ts +29 -11
  64. package/@types/router/state/state-object.d.ts +67 -21
  65. package/@types/router/state/state-queue-manager.d.ts +19 -10
  66. package/@types/router/state/state-registry.d.ts +80 -28
  67. package/@types/router/state/state-service.d.ts +182 -123
  68. package/@types/router/state/target-state.d.ts +36 -27
  69. package/@types/router/state/views.d.ts +48 -19
  70. package/@types/router/template-factory.d.ts +8 -15
  71. package/@types/router/transition/hook-builder.d.ts +17 -6
  72. package/@types/router/transition/hook-registry.d.ts +80 -46
  73. package/@types/router/transition/interface.d.ts +138 -118
  74. package/@types/router/transition/reject-factory.d.ts +58 -22
  75. package/@types/router/transition/transition-event-type.d.ts +19 -8
  76. package/@types/router/transition/transition-hook.d.ts +50 -29
  77. package/@types/router/transition/transition-service.d.ts +186 -30
  78. package/@types/router/transition/transition.d.ts +201 -70
  79. package/@types/router/url/interface.d.ts +140 -0
  80. package/@types/router/url/url-config.d.ts +19 -16
  81. package/@types/router/url/url-matcher.d.ts +66 -46
  82. package/@types/router/url/url-rule.d.ts +58 -35
  83. package/@types/router/url/url-rules.d.ts +38 -28
  84. package/@types/router/url/url-service.d.ts +68 -41
  85. package/@types/router/view/interface.d.ts +10 -30
  86. package/@types/router/view/view.d.ts +35 -21
  87. package/@types/services/anchor-scroll/interface.d.ts +1 -1
  88. package/@types/services/http/http.d.ts +19 -22
  89. package/@types/services/http/interface.d.ts +11 -23
  90. package/@types/services/location/interface.d.ts +1 -4
  91. package/@types/services/location/location.d.ts +13 -13
  92. package/@types/services/sce/sce.d.ts +14 -8
  93. package/@types/services/template-request/template-request.d.ts +21 -4
  94. package/@types/shared/common.d.ts +5 -32
  95. package/@types/shared/dom.d.ts +10 -5
  96. package/@types/shared/interface.d.ts +4 -0
  97. package/@types/shared/utils.d.ts +17 -6
  98. package/dist/angular-ts.esm.js +6424 -2850
  99. package/dist/angular-ts.umd.js +6424 -2850
  100. package/dist/angular-ts.umd.min.js +1 -1
  101. package/dist/angular-ts.umd.min.js.gz +0 -0
  102. package/dist/angular-ts.umd.min.js.map +1 -1
  103. package/package.json +1 -2
  104. package/@types/animations/animate-css.d.ts +0 -11
  105. package/@types/filters/filters.d.ts +0 -38
  106. package/@types/router/hooks/update-globals.d.ts +0 -1
  107. package/@types/router/hooks/url.d.ts +0 -5
@@ -25,16 +25,12 @@ export class StateProvider {
25
25
  get params(): import("../params/state-params.js").StateParams;
26
26
  /**
27
27
  * The current [[StateDeclaration]]
28
- *
29
- * @deprecated This is a passthrough through to [[Router.current]]
30
28
  */
31
29
  get current(): import("./interface.ts").StateDeclaration;
32
30
  /**
33
31
  * The current [[StateObject]] (an internal API)
34
- *
35
- * @deprecated This is a passthrough through to [[Router.$current]]
36
32
  */
37
- get $current(): import("./state-object.js").StateObject;
33
+ get $current(): ng.StateObject;
38
34
  /**
39
35
  * @type {ng.RouterProvider}
40
36
  */
@@ -43,17 +39,23 @@ export class StateProvider {
43
39
  * @type {ng.TransitionProvider}
44
40
  */
45
41
  transitionService: ng.TransitionProvider;
46
- stateRegistry: any;
47
- /** @type {ng.UrlService} */
48
- urlService: ng.UrlService;
49
- /** @type {ng.InjectorService} */
50
- $injector: ng.InjectorService;
51
- invalidCallbacks: any[];
42
+ /**
43
+ * @type {StateRegistryProvider | undefined}
44
+ */
45
+ stateRegistry: StateRegistryProvider | undefined;
46
+ /** @type {ng.UrlService | undefined } */
47
+ urlService: ng.UrlService | undefined;
48
+ /** @type {ng.InjectorService | undefined } */
49
+ $injector: ng.InjectorService | undefined;
50
+ /**
51
+ * @type {import("./interface.ts").OnInvalidCallback[]}
52
+ */
53
+ invalidCallbacks: import("./interface.ts").OnInvalidCallback[];
52
54
  /** @type {ng.ExceptionHandlerService} */
53
55
  _defaultErrorHandler: ng.ExceptionHandlerService;
54
56
  $get: (
55
57
  | string
56
- | (($injector: ng.InjectorService, $url: any) => StateProvider)
58
+ | (($injector: ng.InjectorService, $url: ng.UrlService) => StateProvider)
57
59
  )[];
58
60
  /**
59
61
  * Decorates states when they are registered
@@ -136,7 +138,7 @@ export class StateProvider {
136
138
  * ```
137
139
  *
138
140
  * @param {string} name The name of the builder function to decorate.
139
- * @param {object} func A function that is responsible for decorating the original
141
+ * @param {import("./interface.ts").BuilderFunction} func A function that is responsible for decorating the original
140
142
  * builder function. The function receives two parameters:
141
143
  *
142
144
  * - `{object}` - state - The state urlConfig object.
@@ -144,7 +146,10 @@ export class StateProvider {
144
146
  *
145
147
  * @return {object} $stateProvider - $stateProvider instance
146
148
  */
147
- decorator(name: string, func: object): object;
149
+ decorator(
150
+ name: string,
151
+ func: import("./interface.ts").BuilderFunction,
152
+ ): object;
148
153
  /**
149
154
  *
150
155
  * @param {import("./interface.ts").StateDeclaration} definition
@@ -158,10 +163,14 @@ export class StateProvider {
158
163
  * The results of the callbacks are wrapped in Promise.resolve(), so the callbacks may return promises.
159
164
  *
160
165
  * If a callback returns an TargetState, then it is used as arguments to $state.transitionTo() and the result returned.
161
- *
162
166
  * @internal
167
+ * @param {PathNode[]} fromPath
168
+ * @param {TargetState} toState
163
169
  */
164
- _handleInvalidTargetState(fromPath: any, toState: any): any;
170
+ _handleInvalidTargetState(
171
+ fromPath: PathNode[],
172
+ toState: TargetState,
173
+ ): Promise<any>;
165
174
  /**
166
175
  * Registers an Invalid State handler
167
176
  *
@@ -179,14 +188,14 @@ export class StateProvider {
179
188
  * });
180
189
  * ```
181
190
  *
182
- * @param {function} callback invoked when the toState is invalid
191
+ * @param {import("./interface.ts").OnInvalidCallback} callback invoked when the toState is invalid
183
192
  * This function receives the (invalid) toState, the fromState, and an injector.
184
193
  * The function may optionally return a [[TargetState]] or a Promise for a TargetState.
185
194
  * If one is returned, it is treated as a redirect.
186
195
  *
187
196
  * @returns a function which deregisters the callback
188
197
  */
189
- onInvalid(callback: Function): any;
198
+ onInvalid(callback: import("./interface.ts").OnInvalidCallback): () => void;
190
199
  /**
191
200
  * Reloads the current state
192
201
  *
@@ -212,7 +221,7 @@ export class StateProvider {
212
221
  * });
213
222
  * ```
214
223
  *
215
- * @param reloadState A state name or a state object.
224
+ * @param {string | StateDeclaration | StateObject} [reloadState] A state name or a state object.
216
225
  * If present, this state and all its children will be reloaded, but ancestors will not reload.
217
226
  *
218
227
  * #### Example:
@@ -231,7 +240,9 @@ export class StateProvider {
231
240
  *
232
241
  * @returns A promise representing the state of the new transition. See [[StateService.go]]
233
242
  */
234
- reload(reloadState: any): any;
243
+ reload(
244
+ reloadState?: string | StateDeclaration | StateObject,
245
+ ): Promise<any> | import("./interface.ts").TransitionPromise;
235
246
  /**
236
247
  * Transition to a different state and/or parameters
237
248
  *
@@ -254,7 +265,7 @@ export class StateProvider {
254
265
  * });
255
266
  * ```
256
267
  *
257
- * @param to Absolute state name, state object, or relative state path (relative to current state).
268
+ * @param {StateOrName} to Absolute state name, state object, or relative state path (relative to current state).
258
269
  *
259
270
  * Some examples:
260
271
  *
@@ -263,24 +274,34 @@ export class StateProvider {
263
274
  * - `$state.go('^.sibling')` - if current state is `home.child`, will go to the `home.sibling` state
264
275
  * - `$state.go('.child.grandchild')` - if current state is home, will go to the `home.child.grandchild` state
265
276
  *
266
- * @param params A map of the parameters that will be sent to the state, will populate $stateParams.
277
+ * @param {*} [params] A map of the parameters that will be sent to the state, will populate $stateParams.
267
278
  *
268
279
  * Any parameters that are not specified will be inherited from current parameter values (because of `inherit: true`).
269
280
  * This allows, for example, going to a sibling state that shares parameters defined by a parent state.
270
281
  *
271
- * @param options Transition options
282
+ * @param {*} [options] Transition options
272
283
  *
273
- * @returns {promise} A promise representing the state of the new transition.
284
+ * @returns {Promise<any>} A promise representing the state of the new transition.
274
285
  */
275
- go(to: any, params: any, options: any): Promise<any>;
286
+ go(to: StateOrName, params?: any, options?: any): Promise<any>;
276
287
  /**
277
288
  * Creates a [[TargetState]]
278
289
  *
279
290
  * This is a factory method for creating a TargetState
280
291
  *
281
292
  * This may be returned from a Transition Hook to redirect a transition, for example.
293
+ * @param {string | import("./interface.ts").StateDeclaration | import("./state-object.js").StateObject} identifier
294
+ * @param {{}} params
295
+ * @param {any} [options]
282
296
  */
283
- target(identifier: any, params: any, options?: {}): TargetState;
297
+ target(
298
+ identifier:
299
+ | string
300
+ | import("./interface.ts").StateDeclaration
301
+ | import("./state-object.js").StateObject,
302
+ params: {},
303
+ options?: any,
304
+ ): TargetState;
284
305
  getCurrentPath(): PathNode[];
285
306
  /**
286
307
  * Low-level method for transitioning to a new state.
@@ -298,85 +319,97 @@ export class StateProvider {
298
319
  * });
299
320
  * ```
300
321
  *
301
- * @param to State name or state object.
302
- * @param toParams A map of the parameters that will be sent to the state,
322
+ * @param {StateOrName} to State name or state object.
323
+ * @param {RawParams} toParams A map of the parameters that will be sent to the state,
303
324
  * will populate $stateParams.
304
- * @param options Transition options
325
+ * @param {TransitionOptions} options Transition options
305
326
  *
306
- * @returns A promise representing the state of the new transition. See [[go]]
327
+ * @returns {TransitionPromise | Promise<any>} A promise representing the state of the new transition. See [[go]]
307
328
  */
308
- transitionTo(to: any, toParams?: {}, options?: {}): any;
329
+ transitionTo(
330
+ to: StateOrName,
331
+ toParams?: RawParams,
332
+ options?: TransitionOptions,
333
+ ): TransitionPromise | Promise<any>;
309
334
  /**
310
- * Checks if the current state *is* the provided state
311
- *
312
- * Similar to [[includes]] but only checks for the full state name.
313
- * If params is supplied then it will be tested for strict equality against the current
314
- * active params object, so all params must match with none missing and no extras.
315
- *
316
- * #### Example:
317
- * ```js
318
- * $state.$current.name = 'contacts.details.item';
319
- *
320
- * // absolute name
321
- * $state.is('contact.details.item'); // returns true
322
- * $state.is(contactDetailItemStateObject); // returns true
323
- * ```
324
- *
325
- * // relative name (. and ^), typically from a template
326
- * // E.g. from the 'contacts.details' template
327
- * ```html
328
- * <div ng-class="{highlighted: $state.is('.item')}">Item</div>
329
- * ```
330
- *
331
- * @param stateOrName The state name (absolute or relative) or state object you'd like to check.
332
- * @param params A param object, e.g. `{sectionId: section.id}`, that you'd like
333
- * to test against the current active state.
334
- * @param options An options object. The options are:
335
- * - `relative`: If `stateOrName` is a relative state name and `options.relative` is set, .is will
336
- * test relative to `options.relative` state (or name).
337
- *
338
- * @returns Returns true if it is the state.
339
- */
340
- is(stateOrName: any, params: any, options: any): boolean;
335
+ * Checks if the current state *is* the provided state
336
+ *
337
+ * Similar to [[includes]] but only checks for the full state name.
338
+ * If params is supplied then it will be tested for strict equality against the current
339
+ * active params object, so all params must match with none missing and no extras.
340
+ *
341
+ * #### Example:
342
+ * ```js
343
+ * $state.$current.name = 'contacts.details.item';
344
+ *
345
+ * // absolute name
346
+ * $state.is('contact.details.item'); // returns true
347
+ * $state.is(contactDetailItemStateObject); // returns true
348
+ * ```
349
+ *
350
+ * // relative name (. and ^), typically from a template
351
+ * // E.g. from the 'contacts.details' template
352
+ * ```html
353
+ * <div ng-class="{highlighted: $state.is('.item')}">Item</div>
354
+ * ```
355
+ * @param {import("./state-matcher.js").StateOrName} stateOrName The state name (absolute or relative) or state object you'd like to check.
356
+ * @param {import("../params/interface.ts").RawParams} [params] A param object, e.g. `{sectionId: section.id}`, that you'd like
357
+ to test against the current active state.
358
+ * @param {{ relative: import("./state-matcher.js").StateOrName | undefined; } | undefined} [options] An options object. The options are:
359
+ - `relative`: If `stateOrName` is a relative state name and `options.relative` is set, .is will
360
+ test relative to `options.relative` state (or name).
361
+ * @returns {boolean | undefined} Returns true if it is the state.
362
+ */
363
+ is(
364
+ stateOrName: import("./state-matcher.js").StateOrName,
365
+ params?: import("../params/interface.ts").RawParams,
366
+ options?:
367
+ | {
368
+ relative: import("./state-matcher.js").StateOrName | undefined;
369
+ }
370
+ | undefined,
371
+ ): boolean | undefined;
341
372
  /**
342
- * Checks if the current state *includes* the provided state
343
- *
344
- * A method to determine if the current active state is equal to or is the child of the
345
- * state stateName. If any params are passed then they will be tested for a match as well.
346
- * Not all the parameters need to be passed, just the ones you'd like to test for equality.
347
- *
348
- * #### Example when `$state.$current.name === 'contacts.details.item'`
349
- * ```js
350
- * // Using partial names
351
- * $state.includes("contacts"); // returns true
352
- * $state.includes("contacts.details"); // returns true
353
- * $state.includes("contacts.details.item"); // returns true
354
- * $state.includes("contacts.list"); // returns false
355
- * $state.includes("about"); // returns false
356
- * ```
357
- *
358
- * #### Glob Examples when `* $state.$current.name === 'contacts.details.item.url'`:
359
- * ```js
360
- * $state.includes("*.details.*.*"); // returns true
361
- * $state.includes("*.details.**"); // returns true
362
- * $state.includes("**.item.**"); // returns true
363
- * $state.includes("*.details.item.url"); // returns true
364
- * $state.includes("*.details.*.url"); // returns true
365
- * $state.includes("*.details.*"); // returns false
366
- * $state.includes("item.**"); // returns false
367
- * ```
368
- *
369
- * @param stateOrName A partial name, relative name, glob pattern,
370
- * or state object to be searched for within the current state name.
371
- * @param params A param object, e.g. `{sectionId: section.id}`,
372
- * that you'd like to test against the current active state.
373
- * @param options An options object. The options are:
374
- * - `relative`: If `stateOrName` is a relative state name and `options.relative` is set, .is will
375
- * test relative to `options.relative` state (or name).
376
- *
377
- * @returns {boolean} Returns true if it does include the state
378
- */
379
- includes(stateOrName: any, params: any, options: any): boolean;
373
+ * Checks if the current state *includes* the provided state
374
+ *
375
+ * A method to determine if the current active state is equal to or is the child of the
376
+ * state stateName. If any params are passed then they will be tested for a match as well.
377
+ * Not all the parameters need to be passed, just the ones you'd like to test for equality.
378
+ *
379
+ * #### Example when `$state.$current.name === 'contacts.details.item'`
380
+ * ```js
381
+ * // Using partial names
382
+ * $state.includes("contacts"); // returns true
383
+ * $state.includes("contacts.details"); // returns true
384
+ * $state.includes("contacts.details.item"); // returns true
385
+ * $state.includes("contacts.list"); // returns false
386
+ * $state.includes("about"); // returns false
387
+ * ```
388
+ *
389
+ * #### Glob Examples when `* $state.$current.name === 'contacts.details.item.url'`:
390
+ * ```js
391
+ * $state.includes("*.details.*.*"); // returns true
392
+ * $state.includes("*.details.**"); // returns true
393
+ * $state.includes("**.item.**"); // returns true
394
+ * $state.includes("*.details.item.url"); // returns true
395
+ * $state.includes("*.details.*.url"); // returns true
396
+ * $state.includes("*.details.*"); // returns false
397
+ * $state.includes("item.**"); // returns false
398
+ * ```
399
+ * @param {StateOrName} stateOrName A partial name, relative name, glob pattern,
400
+ or state object to be searched for within the current state name.
401
+ * @param {RawParams} [params] A param object, e.g. `{sectionId: section.id}`,
402
+ that you'd like to test against the current active state.
403
+ * @param {TransitionOptions} [options] An options object. The options are:
404
+ - `relative`: If `stateOrName` is a relative state name and `options.relative` is set, .is will
405
+ test relative to `options.relative` state (or name).
406
+ * @returns {boolean | undefined} Returns true if it does include the state
407
+ */
408
+ includes(
409
+ stateOrName: StateOrName,
410
+ params?: RawParams,
411
+ options?: TransitionOptions,
412
+ ): boolean | undefined;
380
413
  /**
381
414
  * Generates a URL for a state and parameters
382
415
  *
@@ -386,14 +419,16 @@ export class StateProvider {
386
419
  * ```js
387
420
  * expect($state.href("about.person", { person: "bob" })).toEqual("/about/bob");
388
421
  * ```
389
- *
390
- * @param stateOrName The state name or state object you'd like to generate a url from.
391
- * @param params An object of parameter values to fill the state's required parameters.
392
- * @param options Options object. The options are:
393
- *
394
- * @returns {string} compiled state url
422
+ * @param {import("./state-matcher.js").StateOrName} stateOrName The state name or state object you'd like to generate a url from.
423
+ * @param {import("../params/interface.ts").RawParams} params An object of parameter values to fill the state's required parameters.
424
+ * @param {import("./interface.ts").HrefOptions} [options] Options object. The options are:
425
+ * @returns {string | null} compiled state url
395
426
  */
396
- href(stateOrName: any, params: any, options: any): string;
427
+ href(
428
+ stateOrName: import("./state-matcher.js").StateOrName,
429
+ params: import("../params/interface.ts").RawParams,
430
+ options?: import("./interface.ts").HrefOptions,
431
+ ): string | null;
397
432
  /**
398
433
  * Sets or gets the default [[transitionTo]] error handler.
399
434
  *
@@ -414,25 +449,49 @@ export class StateProvider {
414
449
  * // Do not log transitionTo errors
415
450
  * });
416
451
  * ```
417
- *
418
- * @param handler a global error handler function
452
+ * @param {import("../../docs.ts").ExceptionHandler | undefined} [handler] a global error handler function
419
453
  * @returns the current global error handler
420
454
  */
421
- defaultErrorHandler(handler: any): any;
422
- get(stateOrName: any, base: any, ...args: any[]): any;
455
+ defaultErrorHandler(
456
+ handler?: import("../../docs.ts").ExceptionHandler | undefined,
457
+ ): import("../../docs.ts").ExceptionHandler;
423
458
  /**
424
- * Lazy loads a state
425
- *
426
- * Explicitly runs a state's [[StateDeclaration.lazyLoad]] function.
427
- *
428
- * @param stateOrName the state that should be lazy loaded
429
- * @param transition the optional Transition context to use (if the lazyLoad function requires an injector, etc)
430
- * Note: If no transition is provided, a noop transition is created using the from the current state to the current state.
431
- * This noop transition is not actually run.
432
- *
433
- * @returns a promise to lazy load
459
+ * @param {import("./interface.ts").StateOrName} stateOrName
460
+ * @param {undefined} [base]
434
461
  */
435
- lazyLoad(stateOrName: any, transition: any): any;
462
+ get(
463
+ stateOrName: import("./interface.ts").StateOrName,
464
+ base?: undefined,
465
+ ...args: any[]
466
+ ):
467
+ | import("./interface.ts").StateDeclaration
468
+ | import("./interface.ts").StateDeclaration[];
469
+ /**
470
+ * Lazy loads a state
471
+ *
472
+ * Explicitly runs a state's [[StateDeclaration.lazyLoad]] function.
473
+ * @param {import("./interface.ts").StateOrName} stateOrName the state that should be lazy loaded
474
+ * @param {ng.Transition} transition the optional Transition context to use (if the lazyLoad function requires an injector, etc)
475
+ Note: If no transition is provided, a noop transition is created using the from the current state to the current state.
476
+ This noop transition is not actually run.
477
+ * @returns a promise to lazy load
478
+ */
479
+ lazyLoad(
480
+ stateOrName: import("./interface.ts").StateOrName,
481
+ transition: ng.Transition,
482
+ ): Promise<import("./interface.ts").LazyLoadResult>;
436
483
  }
437
- import { TargetState } from "./target-state.js";
484
+ export type StateRegistryProvider =
485
+ import("./state-registry.js").StateRegistryProvider;
486
+ export type StateDeclaration = import("./interface.ts").StateDeclaration;
487
+ export type StateObject = import("./state-object.js").StateObject;
488
+ export type StateOrName = import("./state-matcher.js").StateOrName;
489
+ export type Transition = import("../transition/transition.js").Transition;
490
+ export type TransitionPromise = import("./interface.ts").TransitionPromise;
491
+ export type TransitionOptions =
492
+ import("../transition/interface.ts").TransitionOptions;
493
+ export type RawParams = import("../params/interface.ts").RawParams;
494
+ export type OnInvalidCallback = import("./interface.ts").OnInvalidCallback;
495
+ export type HookResult = import("../transition/transition-hook.js").HookResult;
438
496
  import { PathNode } from "../path/path-node.js";
497
+ import { TargetState } from "./target-state.js";
@@ -34,37 +34,37 @@ export class TargetState {
34
34
  * Note: Do not construct a `TargetState` manually.
35
35
  * To create a `TargetState`, use the [[StateService.target]] factory method.
36
36
  *
37
- * @param _stateRegistry The StateRegistry to use to look up the _definition
38
- * @param _identifier An identifier for a state.
37
+ * @param {import("./state-service.js").StateRegistryProvider} _stateRegistry The StateRegistry to use to look up the _definition
38
+ * @param {import("./interface.js").StateOrName} _identifier An identifier for a state.
39
39
  * Either a fully-qualified state name, or the object used to define the state.
40
- * @param _params Parameters for the target state
41
- * @param _options Transition options.
40
+ * @param {import("../params/interface.js").RawParams} _params Parameters for the target state
41
+ * @param {import("../transition/interface.js").TransitionOptions} _options Transition options.
42
42
  *
43
43
  * @internal
44
44
  */
45
45
  constructor(
46
- _stateRegistry: any,
47
- _identifier: any,
48
- _params: any,
49
- _options: any,
46
+ _stateRegistry: import("./state-service.js").StateRegistryProvider,
47
+ _identifier: import("./interface.js").StateOrName,
48
+ _params: import("../params/interface.js").RawParams,
49
+ _options: import("../transition/interface.js").TransitionOptions,
50
50
  );
51
- _stateRegistry: any;
52
- _identifier: any;
53
- _params: any;
54
- _options: any;
55
- _definition: any;
51
+ _stateRegistry: import("./state-registry.js").StateRegistryProvider;
52
+ _identifier: import("./interface.js").StateOrName;
53
+ _params: import("../params/interface.js").RawParams;
54
+ _options: import("../transition/interface.js").TransitionOptions;
55
+ _definition: import("./state-object.js").StateObject;
56
56
  /** The name of the state this object targets */
57
- name(): any;
57
+ name(): import("./interface.js").StateOrName;
58
58
  /** The identifier used when creating this TargetState */
59
- identifier(): any;
59
+ identifier(): import("./interface.js").StateOrName;
60
60
  /** The target parameter values */
61
- params(): any;
61
+ params(): import("../params/interface.js").RawParams;
62
62
  /** The internal state object (if it was found) */
63
- $state(): any;
63
+ $state(): import("./state-object.js").StateObject;
64
64
  /** The internal state declaration (if it was found) */
65
- state(): any;
65
+ state(): import("./interface.js").StateDeclaration;
66
66
  /** The target options */
67
- options(): any;
67
+ options(): import("../transition/interface.js").TransitionOptions;
68
68
  /** True if the target state was found */
69
69
  exists(): boolean;
70
70
  /** True if the object is valid */
@@ -76,25 +76,34 @@ export class TargetState {
76
76
  * Returns a copy of this TargetState which targets a different state.
77
77
  * The new TargetState has the same parameter values and transition options.
78
78
  *
79
- * @param state The new state that should be targeted
79
+ * @param {import("./interface.js").StateOrName} state The new state that should be targeted
80
+ * @returns {TargetState} A new TargetState instance which targets the desired state
80
81
  */
81
- withState(state: any): TargetState;
82
+ withState(state: import("./interface.js").StateOrName): TargetState;
82
83
  /**
83
84
  * Returns a copy of this TargetState, using the specified parameter values.
84
85
  *
85
- * @param params the new parameter values to use
86
- * @param replace When false (default) the new parameter values will be merged with the current values.
86
+ * @param {import("../params/interface.js").RawParams} params the new parameter values to use
87
+ * @param {boolean} replace When false (default) the new parameter values will be merged with the current values.
87
88
  * When true the parameter values will be used instead of the current values.
89
+ * @returns {TargetState} A new TargetState instance which targets the same state with the desired parameters
88
90
  */
89
- withParams(params: any, replace?: boolean): TargetState;
91
+ withParams(
92
+ params: import("../params/interface.js").RawParams,
93
+ replace?: boolean,
94
+ ): TargetState;
90
95
  /**
91
96
  * Returns a copy of this TargetState, using the specified Transition Options.
92
97
  *
93
- * @param options the new options to use
94
- * @param replace When false (default) the new options will be merged with the current options.
98
+ * @param {import("../transition/interface.js").TransitionOptions} options the new options to use
99
+ * @param {boolean} replace When false (default) the new options will be merged with the current options.
95
100
  * When true the options will be used instead of the current options.
101
+ * @returns {TargetState} A new TargetState instance which targets the same state with the desired options
96
102
  */
97
- withOptions(options: any, replace?: boolean): TargetState;
103
+ withOptions(
104
+ options: import("../transition/interface.js").TransitionOptions,
105
+ replace?: boolean,
106
+ ): TargetState;
98
107
  }
99
108
  export namespace TargetState {
100
109
  /** Returns true if the object has a state property that might be a state or state name */
@@ -1,4 +1,10 @@
1
- export function getViewConfigFactory(): (path: any, view: any) => ViewConfig;
1
+ /**
2
+ * @return {(path: import("../path/path-node.js").PathNode[], view: import("./interface.ts").ViewDeclaration) => ViewConfig}
3
+ */
4
+ export function getViewConfigFactory(): (
5
+ path: import("../path/path-node.js").PathNode[],
6
+ view: import("./interface.ts").ViewDeclaration,
7
+ ) => ViewConfig;
2
8
  /**
3
9
  * This is a [[StateBuilder.builder]] function for angular1 `views`.
4
10
  *
@@ -7,23 +13,25 @@ export function getViewConfigFactory(): (path: any, view: any) => ViewConfig;
7
13
  *
8
14
  * If no `views: {}` property exists on the [[StateDeclaration]], then it creates the `views` object
9
15
  * and applies the state-level configuration to a view named `$default`.
10
- *
16
+ * @param {ng.StateObject & Record<string, any>} state
11
17
  */
12
- export function ng1ViewsBuilder(state: any): {};
18
+ export function ng1ViewsBuilder(
19
+ state: ng.StateObject & Record<string, any>,
20
+ ): Record<string, any>;
13
21
  export class ViewConfig {
14
22
  /**
15
23
  * Normalizes a view's name from a state.views configuration block.
16
24
  *
17
- * This should be used by a framework implementation to calculate the values for
25
+ * This calculates the values for
18
26
  * [[_ViewDeclaration.$ngViewName]] and [[_ViewDeclaration.$ngViewContextAnchor]].
19
27
  *
20
- * @param context the context object (state declaration) that the view belongs to
21
- * @param rawViewName the name of the view, as declared in the [[StateDeclaration.views]]
28
+ * @param {import("./state-service.js").StateObject} context the context object (state declaration) that the view belongs to
29
+ * @param {string} rawViewName the name of the view, as declared in the [[StateDeclaration.views]]
22
30
  *
23
31
  * @returns the normalized ngViewName and ngViewContextAnchor that the view targets
24
32
  */
25
33
  static normalizeUIViewTarget(
26
- context: any,
34
+ context: import("./state-service.js").StateObject,
27
35
  rawViewName?: string,
28
36
  ): {
29
37
  ngViewName: string;
@@ -31,28 +39,49 @@ export class ViewConfig {
31
39
  };
32
40
  /**
33
41
  * @param {Array<import('../path/path-node.js').PathNode>} path
34
- * @param viewDecl
42
+ * @param {import("./interface.ts").ViewDeclaration} viewDecl
35
43
  * @param {import('../template-factory.js').TemplateFactoryProvider} factory
36
44
  */
37
45
  constructor(
38
46
  path: Array<import("../path/path-node.js").PathNode>,
39
- viewDecl: any,
47
+ viewDecl: import("./interface.ts").ViewDeclaration,
40
48
  factory: import("../template-factory.js").TemplateFactoryProvider,
41
49
  );
42
- path: import("../path/path-node.js").PathNode[];
43
- viewDecl: any;
50
+ $id: number;
51
+ /**
52
+ * @type {Array<import('../path/path-node.js').PathNode>}
53
+ */
54
+ path: Array<import("../path/path-node.js").PathNode>;
55
+ /**
56
+ * @type {import("./interface.ts").ViewDeclaration}
57
+ */
58
+ viewDecl: import("./interface.ts").ViewDeclaration;
59
+ /**
60
+ * @type {import('../template-factory.js').TemplateFactoryProvider}
61
+ */
44
62
  factory: import("../template-factory.js").TemplateFactoryProvider;
45
- component: any;
46
- template: any;
47
- /** @type {Number} */ $id: number;
63
+ /**
64
+ * @type {string | undefined}
65
+ */
66
+ component: string | undefined;
67
+ /**
68
+ * @type {string | undefined}
69
+ */
70
+ template: string | undefined;
71
+ /** @type {boolean} */
48
72
  loaded: boolean;
49
- getTemplate: (ngView: any, context: any) => any;
50
- load(): Promise<this>;
73
+ getTemplate: (ngView: any, context: ResolveContext) => string;
74
+ /**
75
+ *
76
+ * @returns {Promise<ViewConfig>}
77
+ */
78
+ load(): Promise<ViewConfig>;
51
79
  controller: any;
52
80
  /**
53
81
  * Gets the controller for a view configuration.
54
- *
55
- * @returns {Function|Promise.<Function>} Returns a controller, or a promise that resolves to a controller.
82
+ * @returns {Function | Promise<Function>} Returns a controller, or a promise that resolves to a controller.
83
+ * @param {ResolveContext} context
56
84
  */
57
- getController(context: any): Function | Promise<Function>;
85
+ getController(context: ResolveContext): Function | Promise<Function>;
58
86
  }
87
+ import { ResolveContext } from "../resolve/resolve-context.js";