@angular-wave/angular.ts 0.14.3 → 0.15.1

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 (100) hide show
  1. package/@types/angular.d.ts +27 -25
  2. package/@types/animations/animate-cache.d.ts +46 -2
  3. package/@types/animations/animate-children-directive.d.ts +4 -4
  4. package/@types/animations/animate-js.d.ts +1 -10
  5. package/@types/animations/animate.d.ts +6 -1
  6. package/@types/animations/interface.d.ts +15 -0
  7. package/@types/animations/runner/animate-runner.d.ts +73 -52
  8. package/@types/animations/shared.d.ts +0 -16
  9. package/@types/core/compile/attributes.d.ts +40 -10
  10. package/@types/core/compile/compile.d.ts +1 -1
  11. package/@types/core/compile/inteface.d.ts +5 -1
  12. package/@types/core/controller/controller.d.ts +1 -1
  13. package/@types/core/di/inteface.d.ts +11 -0
  14. package/@types/core/interpolate/interface.d.ts +1 -0
  15. package/@types/core/parse/ast/ast-node.d.ts +2 -0
  16. package/@types/core/parse/interface.d.ts +1 -1
  17. package/@types/core/parse/interpreter.d.ts +5 -3
  18. package/@types/core/parse/parse.d.ts +4 -1
  19. package/@types/core/scope/interface.d.ts +26 -0
  20. package/@types/core/scope/scope.d.ts +13 -13
  21. package/@types/directive/attrs/attrs.d.ts +2 -5
  22. package/@types/directive/bind/bind.d.ts +5 -7
  23. package/@types/directive/class/class.d.ts +3 -3
  24. package/@types/directive/controller/controller.d.ts +2 -2
  25. package/@types/directive/form/form.d.ts +16 -13
  26. package/@types/directive/include/include.d.ts +4 -4
  27. package/@types/directive/init/init.d.ts +2 -2
  28. package/@types/directive/input/input.d.ts +16 -0
  29. package/@types/directive/listener/listener.d.ts +4 -0
  30. package/@types/directive/messages/messages.d.ts +9 -8
  31. package/@types/directive/model/interface.d.ts +18 -0
  32. package/@types/directive/model/model.d.ts +25 -23
  33. package/@types/directive/non-bindable/non-bindable.d.ts +2 -2
  34. package/@types/directive/ref/ref.d.ts +5 -8
  35. package/@types/directive/repeat/repeat.d.ts +2 -4
  36. package/@types/directive/script/script.d.ts +2 -2
  37. package/@types/directive/select/select.d.ts +9 -10
  38. package/@types/directive/setter/setter.d.ts +2 -2
  39. package/@types/directive/show-hide/show-hide.d.ts +2 -4
  40. package/@types/directive/switch/switch.d.ts +4 -4
  41. package/@types/directive/validators/validators.d.ts +2 -2
  42. package/@types/injection-tokens.d.ts +3 -2
  43. package/@types/interface.d.ts +72 -23
  44. package/@types/namespace.d.ts +50 -6
  45. package/@types/router/directives/state-directives.d.ts +26 -24
  46. package/@types/router/directives/view-directive.d.ts +27 -131
  47. package/@types/router/glob/glob.d.ts +2 -6
  48. package/@types/router/router.d.ts +6 -4
  49. package/@types/router/scroll/interface.d.ts +3 -0
  50. package/@types/router/scroll/view-scroll.d.ts +8 -0
  51. package/@types/router/state/interface.d.ts +30 -126
  52. package/@types/router/state/state-builder.d.ts +14 -7
  53. package/@types/router/state/state-matcher.d.ts +11 -3
  54. package/@types/router/state/state-object.d.ts +5 -7
  55. package/@types/router/state/state-queue-manager.d.ts +14 -8
  56. package/@types/router/state/state-registry.d.ts +26 -12
  57. package/@types/router/state/state-service.d.ts +24 -12
  58. package/@types/router/template-factory.d.ts +2 -2
  59. package/@types/router/transition/hook-registry.d.ts +15 -5
  60. package/@types/router/transition/interface.d.ts +9 -9
  61. package/@types/router/transition/transition-hook.d.ts +11 -0
  62. package/@types/router/transition/transition-service.d.ts +12 -5
  63. package/@types/router/transition/transition.d.ts +20 -14
  64. package/@types/router/url/url-rule.d.ts +12 -9
  65. package/@types/router/url/url-rules.d.ts +3 -84
  66. package/@types/router/url/url-service.d.ts +23 -18
  67. package/@types/router/view/view.d.ts +4 -4
  68. package/@types/services/anchor-scroll/anchor-scroll.d.ts +2 -17
  69. package/@types/services/anchor-scroll/interface.d.ts +15 -0
  70. package/@types/services/cookie/cookie.d.ts +7 -13
  71. package/@types/services/exception/interface.d.ts +3 -3
  72. package/@types/services/http/http.d.ts +6 -31
  73. package/@types/services/http/interface.d.ts +22 -0
  74. package/@types/services/location/location.d.ts +14 -13
  75. package/@types/services/log/log.d.ts +7 -3
  76. package/@types/services/pubsub/pubsub.d.ts +18 -13
  77. package/@types/services/rest/rest.d.ts +7 -5
  78. package/@types/services/sce/interface.d.ts +25 -0
  79. package/@types/services/sce/sce.d.ts +9 -1
  80. package/@types/services/sse/interface.d.ts +8 -1
  81. package/@types/services/sse/sse.d.ts +10 -18
  82. package/@types/services/storage/storage.d.ts +6 -6
  83. package/@types/services/stream/interface.d.ts +1 -1
  84. package/@types/services/stream/stream.d.ts +98 -0
  85. package/@types/shared/common.d.ts +2 -2
  86. package/@types/shared/dom.d.ts +21 -42
  87. package/@types/shared/hof.d.ts +27 -37
  88. package/@types/shared/noderef.d.ts +3 -3
  89. package/@types/shared/strings.d.ts +31 -10
  90. package/@types/shared/utils.d.ts +207 -101
  91. package/@types/shared/validate.d.ts +20 -0
  92. package/dist/angular-ts.esm.js +2461 -2298
  93. package/dist/angular-ts.umd.js +2461 -2298
  94. package/dist/angular-ts.umd.min.js +1 -1
  95. package/dist/angular-ts.umd.min.js.gz +0 -0
  96. package/dist/angular-ts.umd.min.js.map +1 -1
  97. package/package.json +1 -1
  98. package/@types/router/state-filters.d.ts +0 -39
  99. package/@types/router/view-scroll.d.ts +0 -12
  100. package/@types/shared/cache.d.ts +0 -7
@@ -1,17 +1,20 @@
1
1
  export class UrlRuleFactory {
2
2
  /**
3
- * @param {import('../url/url-service.js').UrlService} urlService
4
- * @param {import('../state/state-service.js').StateProvider} stateService
5
- * @param {import('../router.js').Router} routerGlobals
3
+ * @param {ng.UrlService} urlService
4
+ * @param {ng.StateService} stateService
5
+ * @param {ng.RouterService} routerGlobals
6
6
  */
7
7
  constructor(
8
- urlService: import("../url/url-service.js").UrlService,
9
- stateService: import("../state/state-service.js").StateProvider,
10
- routerGlobals: import("../router.js").Router,
8
+ urlService: ng.UrlService,
9
+ stateService: ng.StateService,
10
+ routerGlobals: ng.RouterService,
11
11
  );
12
- urlService: import("../url/url-service.js").UrlService;
13
- stateService: import("../state/state-service.js").StateProvider;
14
- routerGlobals: import("../router.js").Router;
12
+ /** @type {ng.UrlService} */
13
+ urlService: ng.UrlService;
14
+ /** @type {ng.StateService} */
15
+ stateService: ng.StateService;
16
+ /** @type {ng.RouterService} */
17
+ routerGlobals: ng.RouterService;
15
18
  /**
16
19
  *
17
20
  * @param {*} what
@@ -14,89 +14,7 @@ export class UrlRules {
14
14
  _sortFn: typeof defaultRuleSortFn;
15
15
  _rules: any[];
16
16
  _id: number;
17
- urlRuleFactory: UrlRuleFactory;
18
- /**
19
- * Defines the initial state, path, or behavior to use when the app starts.
20
- *
21
- * This rule defines the initial/starting state for the application.
22
- *
23
- * This rule is triggered the first time the URL is checked (when the app initially loads).
24
- * The rule is triggered only when the url matches either `""` or `"/"`.
25
- *
26
- * Note: The rule is intended to be used when the root of the application is directly linked to.
27
- * When the URL is *not* `""` or `"/"` and doesn't match other rules, the [[otherwise]] rule is triggered.
28
- * This allows 404-like behavior when an unknown URL is deep-linked.
29
- *
30
- * #### Example:
31
- * Start app at `home` state.
32
- * ```js
33
- * .initial({ state: 'home' });
34
- * ```
35
- *
36
- * #### Example:
37
- * Start app at `/home` (by url)
38
- * ```js
39
- * .initial('/home');
40
- * ```
41
- *
42
- * #### Example:
43
- * When no other url rule matches, go to `home` state
44
- * ```js
45
- * .initial((matchValue, url, router) => {
46
- * console.log('initial state');
47
- * return { state: 'home' };
48
- * })
49
- * ```
50
- *
51
- * @param handler The initial state or url path, or a function which returns the state or url path (or performs custom logic).
52
- */
53
- initial(handler: any): void;
54
- /**
55
- * Defines the state, url, or behavior to use when no other rule matches the URL.
56
- *
57
- * This rule is matched when *no other rule* matches.
58
- * It is generally used to handle unknown URLs (similar to "404" behavior, but on the client side).
59
- *
60
- * - If `handler` a string, it is treated as a url redirect
61
- *
62
- * #### Example:
63
- * When no other url rule matches, redirect to `/index`
64
- * ```js
65
- * .otherwise('/index');
66
- * ```
67
- *
68
- * - If `handler` is an object with a `state` property, the state is activated.
69
- *
70
- * #### Example:
71
- * When no other url rule matches, redirect to `home` and provide a `dashboard` parameter value.
72
- * ```js
73
- * .otherwise({ state: 'home', params: { dashboard: 'default' } });
74
- * ```
75
- *
76
- * - If `handler` is a function, the function receives the current url ([[UrlParts]]) and the [[UIRouter]] object.
77
- * The function can perform actions, and/or return a value.
78
- *
79
- * #### Example:
80
- * When no other url rule matches, manually trigger a transition to the `home` state
81
- * ```js
82
- * .otherwise((matchValue, urlParts, router) => {
83
- * router.stateService.go('home');
84
- * });
85
- * ```
86
- *
87
- * #### Example:
88
- * When no other url rule matches, go to `home` state
89
- * ```js
90
- * .otherwise((matchValue, urlParts, router) => {
91
- * return { state: 'home' };
92
- * });
93
- * ```
94
- *
95
- * @param handler The url path to redirect to, or a function which returns the url path (or performs custom logic).
96
- */
97
- otherwise(handler: any): void;
98
- _otherwiseFn: import("./url-rule.js").BaseUrlRule;
99
- _sorted: boolean;
17
+ _urlRuleFactory: UrlRuleFactory;
100
18
  /**
101
19
  * Remove a rule previously registered
102
20
  *
@@ -113,9 +31,10 @@ export class UrlRules {
113
31
  * A rule should have a `match` function which returns truthy if the rule matched.
114
32
  * It should also have a `handler` function which is invoked if the rule is the best match.
115
33
  *
116
- * @return a function that deregisters the rule
34
+ * @returns {() => void } a function that deregisters the rule
117
35
  */
118
36
  rule(rule: any): () => void;
37
+ _sorted: boolean;
119
38
  /**
120
39
  * Gets all registered rules
121
40
  *
@@ -4,35 +4,37 @@
4
4
  export class UrlService {
5
5
  static $inject: string[];
6
6
  /**
7
- * @param {import("../../services/location/location").LocationProvider} $locationProvider
8
- * @param {import("../../router/state/state-service.js").StateProvider} stateService
9
- * @param {import("../router.js").Router} globals
7
+ * @param {ng.LocationProvider} $locationProvider
8
+ * @param {import("../../router/state/state-service.js").StateProvider} stateProvider
9
+ * @param {import("../router.js").RouterProvider} globals
10
10
  * @param {import("../../router/url/url-config.js").UrlConfigProvider} urlConfigProvider
11
11
  */
12
12
  constructor(
13
- $locationProvider: any,
14
- stateService: import("../../router/state/state-service.js").StateProvider,
15
- globals: import("../router.js").Router,
13
+ $locationProvider: ng.LocationProvider,
14
+ stateProvider: import("../../router/state/state-service.js").StateProvider,
15
+ globals: import("../router.js").RouterProvider,
16
16
  urlConfigProvider: import("../../router/url/url-config.js").UrlConfigProvider,
17
17
  );
18
- /** @type {import("../../services/location/location").Location} */
19
- $location: any;
20
- $locationProvider: any;
18
+ /** @type {ng.LocationService} */
19
+ $location: ng.LocationService;
20
+ /** @private */
21
+ private _locationProvider;
21
22
  stateService: import("../../router/state/state-service.js").StateProvider;
22
- /** Provides services related to the URL */
23
- urlRuleFactory: UrlRuleFactory;
23
+ /** @type {UrlRuleFactory} Provides services related to the URL */
24
+ _urlRuleFactory: UrlRuleFactory;
24
25
  /**
25
26
  * The nested [[UrlRules]] API for managing URL rules and rewrites
27
+ * @ignore
26
28
  * @type {UrlRules}
27
29
  */
28
- rules: UrlRules;
30
+ _rules: UrlRules;
29
31
  /**
30
32
  * The nested [[UrlConfig]] API to configure the URL and retrieve URL information
31
33
  * @type {import("./url-config.js").UrlConfigProvider}
32
34
  */
33
- config: import("./url-config.js").UrlConfigProvider;
34
- /** Creates a new [[Param]] for a given location (DefType) */
35
- paramFactory: ParamFactory;
35
+ _config: import("./url-config.js").UrlConfigProvider;
36
+ /** @type {ParamFactory} Creates a new [[Param]] for a given location (DefType) */
37
+ _paramFactory: ParamFactory;
36
38
  _urlListeners: any[];
37
39
  /**
38
40
  * Gets the path part of the current url
@@ -60,7 +62,10 @@ export class UrlService {
60
62
  getHash(): string;
61
63
  $get: (
62
64
  | string
63
- | (($location: ng.LocationService, $rootScope: ng.Scope) => UrlService)
65
+ | ((
66
+ $location: ng.LocationService,
67
+ $rootScope: ng.RootScopeService,
68
+ ) => ng.UrlService)
64
69
  )[];
65
70
  /**
66
71
  * @returns {string}
@@ -118,7 +123,7 @@ export class UrlService {
118
123
  *
119
124
  * @return the url (after potentially being processed)
120
125
  */
121
- url(newUrl?: string, state?: any): any;
126
+ url(newUrl?: string, state?: any): string;
122
127
  /**
123
128
  * @private
124
129
  *
@@ -196,7 +201,7 @@ export class UrlService {
196
201
  */
197
202
  match(url: any): any;
198
203
  update(read: any): void;
199
- location: any;
204
+ location: string;
200
205
  /**
201
206
  * Internal API.
202
207
  *
@@ -4,20 +4,20 @@ export class ViewService {
4
4
  _listeners: any[];
5
5
  $get: () => this;
6
6
  /**
7
- * @param {?import('../state/state-object.js').StateObject} context
7
+ * @param {?import('../state/state-object.js').StateObject} [context]
8
8
  * @return {?import('../state/state-object.js').StateObject}
9
9
  */
10
10
  rootViewContext(
11
- context: import("../state/state-object.js").StateObject | null,
11
+ context?: import("../state/state-object.js").StateObject | null,
12
12
  ): import("../state/state-object.js").StateObject | null;
13
13
  _rootContext: any;
14
- viewConfigFactory(factory: any): void;
14
+ _viewConfigFactory(factory: any): void;
15
15
  /**
16
16
  * @param path
17
17
  * @param decl
18
18
  * @return {import("../state/views.js").ViewConfig}
19
19
  */
20
- createViewConfig(
20
+ _createViewConfig(
21
21
  path: any,
22
22
  decl: any,
23
23
  ): import("../state/views.js").ViewConfig;
@@ -1,25 +1,10 @@
1
- /**
2
- * @typedef {Object} AnchorScrollObject
3
- * @property {number|function|Element} yOffset
4
- */
5
- /**
6
- * @typedef {(string) => void} AnchorScrollFunction
7
- */
8
- /**
9
- * @typedef {AnchorScrollFunction | AnchorScrollObject} AnchorScrollService
10
- */
11
1
  export class AnchorScrollProvider {
12
2
  autoScrollingEnabled: boolean;
13
3
  $get: (
14
4
  | string
15
5
  | ((
16
- $location: import("../../services/location/location.js").Location,
6
+ $location: ng.LocationService,
17
7
  $rootScope: ng.Scope,
18
- ) => AnchorScrollFunction)
8
+ ) => import("./interface.ts").AnchorScrollFunction)
19
9
  )[];
20
10
  }
21
- export type AnchorScrollObject = {
22
- yOffset: number | Function | Element;
23
- };
24
- export type AnchorScrollFunction = (string: any) => void;
25
- export type AnchorScrollService = AnchorScrollFunction | AnchorScrollObject;
@@ -0,0 +1,15 @@
1
+ export interface AnchorScrollObject {
2
+ /**
3
+ * Vertical scroll offset.
4
+ * Can be a number, a function returning a number,
5
+ * or an Element whose offsetTop will be used.
6
+ */
7
+ yOffset?: number | (() => number) | Element;
8
+ }
9
+ export type AnchorScrollFunction = (hash?: string) => void;
10
+ /**
11
+ * AngularJS $anchorScroll service
12
+ *
13
+ * Callable as a function and also exposes properties.
14
+ */
15
+ export type AnchorScrollService = AnchorScrollFunction | AnchorScrollObject;
@@ -3,11 +3,9 @@
3
3
  * @type {ng.ServiceProvider}
4
4
  */
5
5
  export class CookieProvider {
6
- defaults: {};
7
- $get: (
8
- | string
9
- | (($exceptionHandler: ng.ExceptionHandlerService) => CookieService)
10
- )[];
6
+ /** @type {ng.CookieOptions} */
7
+ defaults: ng.CookieOptions;
8
+ $get: () => CookieService;
11
9
  }
12
10
  /**
13
11
  *
@@ -20,15 +18,10 @@ export class CookieService {
20
18
  /**
21
19
  * @param {ng.CookieOptions} defaults
22
20
  * Default cookie attributes defined by `$cookiesProvider.defaults`.
23
- * @param {ng.ExceptionHandlerService} $exceptionHandler
24
21
  */
25
- constructor(
26
- defaults: ng.CookieOptions,
27
- $exceptionHandler: ng.ExceptionHandlerService,
28
- );
29
- /** @type {ng.CookieOptions} */
30
- _defaults: ng.CookieOptions;
31
- _$exceptionHandler: import("../exception/interface.ts").ExceptionHandler;
22
+ constructor(defaults: ng.CookieOptions);
23
+ /** @private @type {ng.CookieOptions} */
24
+ private _defaults;
32
25
  /**
33
26
  * Retrieves a raw cookie value.
34
27
  *
@@ -59,6 +52,7 @@ export class CookieService {
59
52
  * @param {string} key
60
53
  * @param {string} value
61
54
  * @param {ng.CookieOptions} [options]
55
+ * @throws {URIError} if key or value cannot be encoded
62
56
  */
63
57
  put(key: string, value: string, options?: ng.CookieOptions): void;
64
58
  /**
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * A callback type for handling errors.
3
3
  *
4
- * @param {Error} exception - The exception associated with the error.
5
- * @throws {Error}
4
+ * @param {unknown} exception - The exception associated with the error.
5
+ * @throws {unknown}
6
6
  */
7
- export type ExceptionHandler = (exception: Error) => never;
7
+ export type ExceptionHandler = (exception: unknown) => never;
@@ -23,21 +23,7 @@ export function defaultHttpResponseTransform(data: any, headers: any): any;
23
23
  */
24
24
  export function HttpProvider(): void;
25
25
  export class HttpProvider {
26
- defaults: {
27
- transformResponse: (typeof defaultHttpResponseTransform)[];
28
- transformRequest: ((data: any) => any)[];
29
- headers: {
30
- common: {
31
- Accept: string;
32
- };
33
- post: any;
34
- put: any;
35
- patch: any;
36
- };
37
- xsrfCookieName: string;
38
- xsrfHeaderName: string;
39
- paramSerializer: string;
40
- };
26
+ defaults: import("./interface.ts").HttpProviderDefaults;
41
27
  /**
42
28
  * Configure $http service to combine processing of multiple http responses received at around
43
29
  * the same time via {@link ng.$rootScope.Scope#$applyAsync $rootScope.$applyAsync}. This can result in
@@ -62,8 +48,11 @@ export class HttpProvider {
62
48
  * array, on request, but reverse order, on response.
63
49
  *
64
50
  * {@link ng.$http#interceptors Interceptors detailed info}
51
+ * @type {Array<string | ng.Injectable<import("./interface.ts").HttpInterceptorFactory>>}
65
52
  */
66
- interceptors: any[];
53
+ interceptors: Array<
54
+ string | ng.Injectable<import("./interface.ts").HttpInterceptorFactory>
55
+ >;
67
56
  /**
68
57
  * Array containing URLs whose origins are trusted to receive the XSRF token. See the
69
58
  * {@link ng.$http#security-considerations Security Considerations} sections for more details on
@@ -118,21 +107,7 @@ export class HttpProvider {
118
107
  *
119
108
  * See "Setting HTTP Headers" and "Transforming Requests and Responses" sections above.
120
109
  */
121
- defaults: {
122
- transformResponse: (typeof defaultHttpResponseTransform)[];
123
- transformRequest: ((data: any) => any)[];
124
- headers: {
125
- common: {
126
- Accept: string;
127
- };
128
- post: any;
129
- put: any;
130
- patch: any;
131
- };
132
- xsrfCookieName: string;
133
- xsrfHeaderName: string;
134
- paramSerializer: string;
135
- };
110
+ defaults: import("./interface.ts").HttpProviderDefaults;
136
111
  })
137
112
  )[];
138
113
  }
@@ -4,6 +4,14 @@ export interface HttpHeadersGetter {
4
4
  };
5
5
  (headerName: string): string;
6
6
  }
7
+ export interface HttpPromiseCallback<T> {
8
+ (
9
+ data: T,
10
+ status: number,
11
+ headers: HttpHeadersGetter,
12
+ config: RequestConfig,
13
+ ): void;
14
+ }
7
15
  export interface HttpRequestConfigHeaders {
8
16
  [requestType: string]: any;
9
17
  common?: any;
@@ -18,6 +26,9 @@ export interface HttpRequestTransformer {
18
26
  export interface HttpResponseTransformer {
19
27
  (data: any, headersGetter: HttpHeadersGetter, status: number): any;
20
28
  }
29
+ export interface HttpHeaderType {
30
+ [requestType: string]: string | ((config: RequestConfig) => string);
31
+ }
21
32
  /**
22
33
  * Object that controls the defaults for $http provider. Not all fields of RequestShortcutConfig can be configured
23
34
  * via defaults and the docs do not say which. The following is based on the inspection of the source code.
@@ -228,3 +239,14 @@ export type HttpParams = Record<
228
239
  * A function that serializes an object into a URL-encoded query string.
229
240
  */
230
241
  export type HttpParamSerializer = (params?: HttpParams) => string;
242
+ export interface HttpInterceptor {
243
+ request?(config: RequestConfig): RequestConfig | Promise<RequestConfig>;
244
+ requestError?(rejection: any): RequestConfig | Promise<RequestConfig>;
245
+ response?<T>(
246
+ response: HttpResponse<T>,
247
+ ): Promise<HttpResponse<T>> | HttpResponse<T>;
248
+ responseError?<T>(rejection: any): Promise<HttpResponse<T>> | HttpResponse<T>;
249
+ }
250
+ export interface HttpInterceptorFactory {
251
+ (...args: any[]): HttpInterceptor;
252
+ }
@@ -182,13 +182,13 @@ export class Location {
182
182
  * Current url
183
183
  * @type {string}
184
184
  */
185
- $$url: string;
185
+ _url: string;
186
186
  /**
187
187
  * @ignore
188
188
  * Callback to update browser url
189
- * @type {Function}
189
+ * @type {Function | undefined}
190
190
  */
191
- $$updateBrowser: Function;
191
+ _updateBrowser: Function | undefined;
192
192
  /**
193
193
  * Change path, search and hash, when called with parameter and return `$location`.
194
194
  *
@@ -249,7 +249,7 @@ export class Location {
249
249
  * @private
250
250
  * Compose url and update `url` and `absUrl` property
251
251
  */
252
- private $$compose;
252
+ private _compose;
253
253
  /**
254
254
  * Change the history state object when called with one parameter and return `$location`.
255
255
  * The state object is later passed to `pushState` or `replaceState`.
@@ -285,15 +285,16 @@ export class LocationProvider {
285
285
  hashPrefixConf: string;
286
286
  /** @type {import("./interface.ts").Html5Mode} */
287
287
  html5ModeConf: import("./interface.ts").Html5Mode;
288
- /** @type {Array<import("./interface.ts").UrlChangeListener>} */
289
- urlChangeListeners: Array<import("./interface.ts").UrlChangeListener>;
290
- urlChangeInit: boolean;
291
- /** @type {History['state']} */
292
- cachedState: History["state"];
293
- /** @type {History['state']} */
294
- lastHistoryState: History["state"];
295
- /** @type {string} */
296
- lastBrowserUrl: string;
288
+ /** @private @type {Array<import("./interface.ts").UrlChangeListener>} */
289
+ private _urlChangeListeners;
290
+ /** @private */
291
+ private _urlChangeInit;
292
+ /** @private @type {History['state']} */
293
+ private _cachedState;
294
+ /** @private @type {History['state']} */
295
+ private _lastHistoryState;
296
+ /** @private @type {string} */
297
+ private _lastBrowserUrl;
297
298
  /**
298
299
  * Updates the browser's current URL and history state.
299
300
  *
@@ -11,13 +11,17 @@ export class LogProvider {
11
11
  * @param {import("./interface.ts").LogServiceFactory} fn
12
12
  */
13
13
  setLogger(fn: import("./interface.ts").LogServiceFactory): void;
14
- /** @private */
15
- private formatError;
14
+ /**
15
+ * @private
16
+ * @param {unknown} arg
17
+ *
18
+ */
19
+ private _formatError;
16
20
  /**
17
21
  * @private
18
22
  * @param {string} type
19
23
  */
20
- private consoleLog;
24
+ private _consoleLog;
21
25
  /**
22
26
  * @returns {ng.LogService}
23
27
  */
@@ -1,23 +1,34 @@
1
- /** @typedef {import('../../interface.ts').ServiceProvider} ServiceProvider
2
-
3
1
  /**
4
2
  * Configurable provider for an injectable event bus
5
- * @extends {ServiceProvider}
3
+ * @implements {ng.ServiceProvider}
6
4
  */
7
- export class PubSubProvider {
5
+ export class PubSubProvider implements ng.ServiceProvider {
6
+ static $inject: string[];
7
+ /**
8
+ * @param {ng.ExceptionHandlerProvider} $exceptionHandler
9
+ * @param {ng.ServiceProvider} angularProvider
10
+ */
11
+ constructor(
12
+ $exceptionHandler: ng.ExceptionHandlerProvider,
13
+ angularProvider: ng.ServiceProvider,
14
+ );
8
15
  /**
9
16
  * @type {PubSub}
10
17
  */
11
18
  eventBus: PubSub;
12
- $get: any[];
19
+ $get: () => PubSub;
13
20
  }
14
21
  export class PubSub {
22
+ /**
23
+ * @param {ng.ExceptionHandlerService} $exceptionHandler
24
+ */
25
+ constructor($exceptionHandler: ng.ExceptionHandlerService);
15
26
  /** @private {Object<string, Array<{fn: Function, context: any}>>} */
16
27
  private _topics;
17
28
  /** @private */
18
29
  private _disposed;
19
- /** @type {ng.ExceptionHandlerService} */
20
- _$exceptionHandler: ng.ExceptionHandlerService;
30
+ /** @public @type {ng.ExceptionHandlerService} */
31
+ public $exceptionHandler: ng.ExceptionHandlerService;
21
32
  /**
22
33
  * Set instance to initial state
23
34
  */
@@ -72,9 +83,3 @@ export class PubSub {
72
83
  */
73
84
  publish(topic: string, ...args: any[]): boolean;
74
85
  }
75
- export const EventBus: PubSub;
76
- /**
77
- * /**
78
- * Configurable provider for an injectable event bus
79
- */
80
- export type ServiceProvider = import("../../interface.ts").ServiceProvider;
@@ -97,10 +97,12 @@ export class RestProvider {
97
97
  */
98
98
  $get: (
99
99
  | string
100
- | (($http: any) => {
101
- (baseUrl: any, entityClass: any, options?: {}): RestService<any, any>;
102
- get(name: any): any;
103
- listNames(): any[];
104
- })
100
+ | ((
101
+ $http: ng.HttpService,
102
+ ) => (
103
+ baseUrl: string,
104
+ entityClass?: ng.EntityClass<T>,
105
+ options?: object,
106
+ ) => RestService<T, ID>)
105
107
  )[];
106
108
  }
@@ -0,0 +1,25 @@
1
+ export interface SCEService {
2
+ getTrusted(type: string, mayBeTrusted: any): any;
3
+ getTrustedCss(value: any): any;
4
+ getTrustedHtml(value: any): any;
5
+ getTrustedJs(value: any): any;
6
+ getTrustedResourceUrl(value: any): any;
7
+ getTrustedUrl(value: any): any;
8
+ parse(type: string, expression: string): (context: any, locals: any) => any;
9
+ parseAsCss(expression: string): (context: any, locals: any) => any;
10
+ parseAsHtml(expression: string): (context: any, locals: any) => any;
11
+ parseAsJs(expression: string): (context: any, locals: any) => any;
12
+ parseAsResourceUrl(expression: string): (context: any, locals: any) => any;
13
+ parseAsUrl(expression: string): (context: any, locals: any) => any;
14
+ trustAs(type: string, value: any): any;
15
+ trustAsHtml(value: any): any;
16
+ trustAsJs(value: any): any;
17
+ trustAsResourceUrl(value: any): any;
18
+ trustAsUrl(value: any): any;
19
+ isEnabled(): boolean;
20
+ }
21
+ export interface SCEDelegateService {
22
+ getTrusted(type: string, mayBeTrusted: any): any;
23
+ trustAs(type: string, value: any): any;
24
+ valueOf(value: any): any;
25
+ }
@@ -1,5 +1,13 @@
1
1
  export function escapeForRegexp(str: any): any;
2
- export function adjustMatcher(matcher: any): any;
2
+ /**
3
+ * Adjusts a matcher string or RegExp into a proper RegExp.
4
+ *
5
+ * @param {string | RegExp | "self"} matcher
6
+ * @returns {RegExp | "self"}
7
+ */
8
+ export function adjustMatcher(
9
+ matcher: string | RegExp | "self",
10
+ ): RegExp | "self";
3
11
  export function SceProvider(): void;
4
12
  export class SceProvider {
5
13
  /**
@@ -32,11 +32,18 @@ export interface SseConfig {
32
32
  export interface SseConnection {
33
33
  /** Manually close the SSE connection and stop all reconnect attempts */
34
34
  close(): void;
35
- /** Manually restart the SSE connection */
35
+ /**
36
+ * Manually restart the SSE connection.
37
+ * @remarks
38
+ * Any previous event listeners are preserved; reconnects use the original configuration.
39
+ */
36
40
  connect(): void;
37
41
  }
38
42
  /**
39
43
  * $sse service type
40
44
  * Returns a managed SSE connection that automatically reconnects when needed.
45
+ * @param url - The endpoint to connect to
46
+ * @param config - Optional configuration object
47
+ * @throws {URIError} If the URL is invalid
41
48
  */
42
49
  export type SseService = (url: string, config?: SseConfig) => SseConnection;