@angular-wave/angular.ts 0.0.67 → 0.0.68

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.
@@ -1,3 +1,34 @@
1
+ export function $LocationProvider(): void;
2
+ export class $LocationProvider {
3
+ /**
4
+ * The default value for the prefix is `'!'`.
5
+ * @param {string=} prefix Prefix for hash part (containing path and search)
6
+ * @returns {*} current value if used as getter or itself (chaining) if used as setter
7
+ */
8
+ hashPrefix: (prefix?: string | undefined) => any;
9
+ /**
10
+ * @param {(boolean|Object)=} mode If boolean, sets `html5Mode.enabled` to value.
11
+ * If object, sets `enabled`, `requireBase` and `rewriteLinks` to respective values. Supported
12
+ * properties:
13
+ * - **enabled** – `{boolean}` – (default: false) If true, will rely on `history.pushState` to
14
+ * change urls where supported. Will fall back to hash-prefixed paths in browsers that do not
15
+ * support `pushState`.
16
+ * - **requireBase** - `{boolean}` - (default: `true`) When html5Mode is enabled, specifies
17
+ * whether or not a <base> tag is required to be present. If `enabled` and `requireBase` are
18
+ * true, and a base tag is not present, an error will be thrown when `$location` is injected.
19
+ * See the {@link guide/$location $location guide for more information}
20
+ * - **rewriteLinks** - `{boolean|string}` - (default: `true`) When html5Mode is enabled,
21
+ * enables/disables URL rewriting for relative links. If set to a string, URL rewriting will
22
+ * only happen on links with an attribute that matches the given string. For example, if set
23
+ * to `'internal-link'`, then the URL will only be rewritten for `<a internal-link>` links.
24
+ * Note that [attribute name normalization](guide/directive#normalization) does not apply
25
+ * here, so `'internalLink'` will **not** match `'internal-link'`.
26
+ *
27
+ * @returns {Object} html5Mode object if used as getter or itself (chaining) if used as setter
28
+ */
29
+ html5Mode: (mode?: (boolean | any) | undefined) => any;
30
+ $get: (string | (($rootScope: import("../scope/scope").Scope, $browser: import("../../services/browser").Browser, $rootElement: JQLite) => Location))[];
31
+ }
1
32
  /**
2
33
  *
3
34
  * @param {string} base
@@ -10,201 +41,239 @@ export function stripHash(url: any): any;
10
41
  export function stripFile(url: any): any;
11
42
  export function serverBase(url: any): any;
12
43
  /**
13
- * LocationHtml5Url represents a URL
14
- * This object is exposed as $location service when HTML5 mode is enabled and supported
15
- *
16
- * @constructor
17
- * @param {string} appBase application base URL
18
- * @param {string} appBaseNoFile application base URL stripped of any filename
19
- * @param {string} basePrefix URL path prefix
44
+ * @abstract
20
45
  */
21
- export function LocationHtml5Url(appBase: string, appBaseNoFile: string, basePrefix: string): void;
22
- export class LocationHtml5Url {
46
+ export class Location {
23
47
  /**
24
- * LocationHtml5Url represents a URL
25
- * This object is exposed as $location service when HTML5 mode is enabled and supported
26
- *
27
- * @constructor
28
48
  * @param {string} appBase application base URL
29
49
  * @param {string} appBaseNoFile application base URL stripped of any filename
30
- * @param {string} basePrefix URL path prefix
31
50
  */
32
- constructor(appBase: string, appBaseNoFile: string, basePrefix: string);
51
+ constructor(appBase: string, appBaseNoFile: string);
52
+ /** @type {string} */
53
+ appBase: string;
54
+ /** @type {string} */
55
+ appBaseNoFile: string;
56
+ /**
57
+ * An absolute URL is the full URL, including protocol (http/https ), the optional subdomain (e.g. www ), domain (example.com), and path (which includes the directory and slug).
58
+ * @type {string}
59
+ */
60
+ $$absUrl: string;
61
+ /**
62
+ * If html5 mode is enabled
63
+ * @type {boolean}
64
+ */
33
65
  $$html5: boolean;
34
66
  /**
35
- * Parse given HTML5 (regular) URL string into properties
36
- * @param {string} url HTML5 URL
37
- * @private
67
+ * Has any change been replacing?
68
+ * @type {boolean}
38
69
  */
39
- private $$parse;
40
- $$normalizeUrl: (url: any) => string;
41
- $$parseLinkUrl: (url: any, relHref: any) => boolean;
42
- }
43
- /**
44
- * LocationHashbangUrl represents URL
45
- * This object is exposed as $location service when developer doesn't opt into html5 mode.
46
- * It also serves as the base class for html5 mode fallback on legacy browsers.
47
- *
48
- * @constructor
49
- * @param {string} appBase application base URL
50
- * @param {string} appBaseNoFile application base URL stripped of any filename
51
- * @param {string} hashPrefix hashbang prefix
52
- */
53
- export function LocationHashbangUrl(appBase: string, appBaseNoFile: string, hashPrefix: string): void;
54
- export class LocationHashbangUrl {
70
+ $$replace: boolean;
71
+ /** @type {import('../url-utils/url-utils').HttpProtocol} */
72
+ $$protocol: import("../url-utils/url-utils").HttpProtocol;
73
+ /** @type {string} */
74
+ $$host: string;
55
75
  /**
56
- * LocationHashbangUrl represents URL
57
- * This object is exposed as $location service when developer doesn't opt into html5 mode.
58
- * It also serves as the base class for html5 mode fallback on legacy browsers.
76
+ * The port, without ":"
77
+ * @type {number}
78
+ */
79
+ $$port: number;
80
+ /**
81
+ * The pathname, beginning with "/"
82
+ * @type {string}
83
+ */
84
+ $$path: string;
85
+ /**
86
+ * The hash string, minus the hash symbol
87
+ * @type {string}
88
+ */
89
+ $$hash: string;
90
+ /**
91
+ * Helper property for scope watch changes
92
+ * @type {boolean}
93
+ */
94
+ $$urlUpdatedByLocation: boolean;
95
+ /**
96
+ * Return full URL representation with all segments encoded according to rules specified in
97
+ * [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt).
59
98
  *
60
- * @constructor
61
- * @param {string} appBase application base URL
62
- * @param {string} appBaseNoFile application base URL stripped of any filename
63
- * @param {string} hashPrefix hashbang prefix
99
+ * @return {string} full URL
64
100
  */
65
- constructor(appBase: string, appBaseNoFile: string, hashPrefix: string);
101
+ absUrl(): string;
66
102
  /**
67
- * Parse given hashbang URL into properties
68
- * @param {string} url Hashbang URL
69
- * @private
103
+ * This method is getter / setter.
104
+ *
105
+ * Return URL (e.g. `/path?a=b#hash`) when called without any parameter.
106
+ * Change path, search and hash, when called with parameter and return `$location`.
107
+ *
108
+ * @param {string=} url New URL without base prefix (e.g. `/path?a=b#hash`)
109
+ * @return {Location|string} url
70
110
  */
71
- private $$parse;
72
- $$normalizeUrl: (url: any) => string;
73
- $$parseLinkUrl: (url: any) => boolean;
74
- }
75
- /**
76
- * LocationHashbangUrl represents URL
77
- * This object is exposed as $location service when html5 history api is enabled but the browser
78
- * does not support it.
79
- *
80
- * @constructor
81
- * @param {string} appBase application base URL
82
- * @param {string} appBaseNoFile application base URL stripped of any filename
83
- * @param {string} hashPrefix hashbang prefix
84
- */
85
- export function LocationHashbangInHtml5Url(appBase: string, appBaseNoFile: string, hashPrefix: string, ...args: any[]): void;
86
- export class LocationHashbangInHtml5Url {
111
+ url(url?: string | undefined): Location | string;
87
112
  /**
88
- * LocationHashbangUrl represents URL
89
- * This object is exposed as $location service when html5 history api is enabled but the browser
90
- * does not support it.
91
113
  *
92
- * @constructor
93
- * @param {string} appBase application base URL
94
- * @param {string} appBaseNoFile application base URL stripped of any filename
95
- * @param {string} hashPrefix hashbang prefix
114
+ * Return protocol of current URL.
115
+ * @return {import("../url-utils/url-utils").HttpProtocol} protocol of current URL
96
116
  */
97
- constructor(appBase: string, appBaseNoFile: string, hashPrefix: string, ...args: any[]);
98
- $$html5: boolean;
99
- $$parseLinkUrl: (url: any, relHref: any) => boolean;
100
- $$normalizeUrl: (url: any) => string;
101
- }
102
- /**
103
- * @ngdoc service
104
- * @name $location
105
- *
106
- * @requires $rootElement
107
- *
108
- * @description
109
- * The $location service parses the URL in the browser address bar (based on the
110
- * [window.location](https://developer.mozilla.org/en/window.location)) and makes the URL
111
- * available to your application. Changes to the URL in the address bar are reflected into
112
- * $location service and changes to $location are reflected into the browser address bar.
113
- *
114
- * **The $location service:**
115
- *
116
- * - Exposes the current URL in the browser address bar, so you can
117
- * - Watch and observe the URL.
118
- * - Change the URL.
119
- * - Synchronizes the URL with the browser when the user
120
- * - Changes the address bar.
121
- * - Clicks the back or forward button (or clicks a History link).
122
- * - Clicks on a link.
123
- * - Represents the URL object as a set of methods (protocol, host, port, path, search, hash).
124
- *
125
- * For more information see {@link guide/$location Developer Guide: Using $location}
126
- */
127
- /**
128
- * @ngdoc provider
129
- * @name $locationProvider
130
- *
131
- *
132
- * @description
133
- * Use the `$locationProvider` to configure how the application deep linking paths are stored.
134
- */
135
- export function $LocationProvider(): void;
136
- export class $LocationProvider {
117
+ protocol(): import("../url-utils/url-utils").HttpProtocol;
137
118
  /**
138
- * @ngdoc method
139
- * @name $locationProvider#hashPrefix
140
- * @description
141
- * The default value for the prefix is `'!'`.
142
- * @param {string=} prefix Prefix for hash part (containing path and search)
143
- * @returns {*} current value if used as getter or itself (chaining) if used as setter
119
+ * This method is getter only.
120
+ *
121
+ * Return host of current URL.
122
+ *
123
+ * Note: compared to the non-AngularJS version `location.host` which returns `hostname:port`, this returns the `hostname` portion only.
124
+ *
125
+ *
126
+ * @return {string} host of current URL.
144
127
  */
145
- hashPrefix: (prefix?: string | undefined) => any;
128
+ host(): string;
146
129
  /**
147
- * @ngdoc method
148
- * @name $locationProvider#html5Mode
149
- * @description
150
- * @param {(boolean|Object)=} mode If boolean, sets `html5Mode.enabled` to value.
151
- * If object, sets `enabled`, `requireBase` and `rewriteLinks` to respective values. Supported
152
- * properties:
153
- * - **enabled** – `{boolean}` – (default: false) If true, will rely on `history.pushState` to
154
- * change urls where supported. Will fall back to hash-prefixed paths in browsers that do not
155
- * support `pushState`.
156
- * - **requireBase** - `{boolean}` - (default: `true`) When html5Mode is enabled, specifies
157
- * whether or not a <base> tag is required to be present. If `enabled` and `requireBase` are
158
- * true, and a base tag is not present, an error will be thrown when `$location` is injected.
159
- * See the {@link guide/$location $location guide for more information}
160
- * - **rewriteLinks** - `{boolean|string}` - (default: `true`) When html5Mode is enabled,
161
- * enables/disables URL rewriting for relative links. If set to a string, URL rewriting will
162
- * only happen on links with an attribute that matches the given string. For example, if set
163
- * to `'internal-link'`, then the URL will only be rewritten for `<a internal-link>` links.
164
- * Note that [attribute name normalization](guide/directive#normalization) does not apply
165
- * here, so `'internalLink'` will **not** match `'internal-link'`.
130
+ * This method is getter only.
166
131
  *
167
- * @returns {Object} html5Mode object if used as getter or itself (chaining) if used as setter
132
+ * Return port of current URL.
133
+ *
134
+ *
135
+ * ```js
136
+ * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo
137
+ * let port = $location.port();
138
+ * // => 80
139
+ * ```
140
+ *
141
+ * @return {number} port
168
142
  */
169
- html5Mode: (mode?: (boolean | any) | undefined) => any;
143
+ port(): number;
144
+ /**
145
+ * This method is getter / setter.
146
+ *
147
+ * Return path of current URL when called without any parameter.
148
+ *
149
+ * Change path when called with parameter and return `$location`.
150
+ *
151
+ * Note: Path should always begin with forward slash (/), this method will add the forward slash
152
+ * if it is missing.
153
+ *
154
+ *
155
+ * ```js
156
+ * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo
157
+ * let path = $location.path();
158
+ * // => "/some/path"
159
+ * ```
160
+ *
161
+ * @param {(string|number)=} path New path
162
+ * @return {(string|object)} path if called with no parameters, or `$location` if called with a parameter
163
+ */
164
+ path(path?: (string | number) | undefined): (string | object);
170
165
  /**
171
- * @ngdoc event
172
- * @name $location#$locationChangeStart
173
- * @eventType broadcast on root scope
174
- * @description
175
- * Broadcasted before a URL will change.
166
+ * This method is getter / setter.
167
+ *
168
+ * Returns the hash fragment when called without any parameters.
169
+ *
170
+ * Changes the hash fragment when called with a parameter and returns `$location`.
176
171
  *
177
- * This change can be prevented by calling
178
- * `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on} for more
179
- * details about event object. Upon successful change
180
- * {@link ng.$location#$locationChangeSuccess $locationChangeSuccess} is fired.
181
172
  *
182
- * The `newState` and `oldState` parameters may be defined only in HTML5 mode and when
183
- * the browser supports the HTML5 History API.
173
+ * ```js
174
+ * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo#hashValue
175
+ * let hash = $location.hash();
176
+ * // => "hashValue"
177
+ * ```
184
178
  *
185
- * @param {Object} angularEvent Synthetic event object.
186
- * @param {string} newUrl New URL
187
- * @param {string=} oldUrl URL that was before it was changed.
188
- * @param {string=} newState New history state object
189
- * @param {string=} oldState History state object that was before it was changed.
179
+ * @param {(string|number)=} hash New hash fragment
180
+ * @return {string|Location} hash
181
+ */
182
+ hash(hash?: (string | number) | undefined): string | Location;
183
+ /**
184
+ * If called, all changes to $location during the current `$digest` will replace the current history
185
+ * record, instead of adding a new one.
186
+ */
187
+ replace(): this;
188
+ /**
189
+ * Returns or sets the search part (as object) of current URL when called without any parameter
190
+ *
191
+ * @param {string|Object=} search New search params - string or hash object.
192
+ * @param {(string|number|Array<string>|boolean)=} paramValue If search is a string or number, then paramValue will override only a single search property.
193
+ * @returns {Object|Location} Search object or Location object
194
+ */
195
+ search(search?: (string | any) | undefined, paramValue?: (string | number | Array<string> | boolean) | undefined, ...args: any[]): any | Location;
196
+ $$search: any;
197
+ /**
198
+ * Compose url and update `url` and `absUrl` property
199
+ * @returns {void}
200
+ */
201
+ $$compose(): void;
202
+ $$url: string;
203
+ /**
204
+ * @param {string} _url
205
+ * @returns {string}
190
206
  */
207
+ $$normalizeUrl(_url: string): string;
191
208
  /**
192
- * @ngdoc event
193
- * @name $location#$locationChangeSuccess
194
- * @eventType broadcast on root scope
195
- * @description
196
- * Broadcasted after a URL was changed.
209
+ * This method is getter / setter.
210
+ *
211
+ * Return the history state object when called without any parameter.
212
+ *
213
+ * Change the history state object when called with one parameter and return `$location`.
214
+ * The state object is later passed to `pushState` or `replaceState`.
215
+ * See {@link https://developer.mozilla.org/en-US/docs/Web/API/History/pushState#state|History.state}
197
216
  *
198
- * The `newState` and `oldState` parameters may be defined only in HTML5 mode and when
199
- * the browser supports the HTML5 History API.
217
+ * NOTE: This method is supported only in HTML5 mode and only in browsers supporting
218
+ * the HTML5 History API (i.e. methods `pushState` and `replaceState`). If you need to support
219
+ * older browsers (like IE9 or Android < 4.0), don't use this method.
200
220
  *
201
- * @param {Object} angularEvent Synthetic event object.
202
- * @param {string} newUrl New URL
203
- * @param {string=} oldUrl URL that was before it was changed.
204
- * @param {string=} newState New history state object
205
- * @param {string=} oldState History state object that was before it was changed.
221
+ * @param {any} state State object for pushState or replaceState
222
+ * @return {any} state
223
+ */
224
+ state(state: any, ...args: any[]): any;
225
+ $$state: any;
226
+ }
227
+ /**
228
+ * This object is exposed as $location service when HTML5 mode is enabled and supported
229
+ */
230
+ export class LocationHtml5Url extends Location {
231
+ /**
232
+ * @param {string} appBase application base URL
233
+ * @param {string} appBaseNoFile application base URL stripped of any filename
234
+ * @param {string} basePrefix URL path prefix
235
+ */
236
+ constructor(appBase: string, appBaseNoFile: string, basePrefix: string);
237
+ basePrefix: string;
238
+ /**
239
+ * Parse given HTML5 (regular) URL string into properties
240
+ * @param {string} url HTML5 URL
241
+ */
242
+ $$parse(url: string): void;
243
+ $$normalizeUrl(url: any): string;
244
+ $$parseLinkUrl: (url: any, relHref: any) => boolean;
245
+ }
246
+ /**
247
+ * LocationHashbangUrl represents URL
248
+ * This object is exposed as $location service when developer doesn't opt into html5 mode.
249
+ * It also serves as the base class for html5 mode fallback on legacy browsers.
250
+ *
251
+ * @constructor
252
+ * @param {string} appBase application base URL
253
+ * @param {string} appBaseNoFile application base URL stripped of any filename
254
+ * @param {string} hashPrefix hashbang prefix
255
+ */
256
+ export class LocationHashbangUrl extends Location {
257
+ constructor(appBase: any, appBaseNoFile: any, hashPrefix: any);
258
+ appBase: any;
259
+ appBaseNoFile: any;
260
+ hashPrefix: any;
261
+ /**
262
+ * Parse given hashbang URL into properties
263
+ * @param {string} url Hashbang URL
206
264
  */
207
- $get: (string | (($rootScope: any, $browser: any, $rootElement: JQLite) => LocationHtml5Url | LocationHashbangUrl))[];
265
+ $$parse(url: string): void;
266
+ $$normalizeUrl(url: any): any;
267
+ $$parseLinkUrl(url: any): boolean;
208
268
  }
209
- export const PATH_MATCH: RegExp;
269
+ export type DefaultPorts = {
270
+ http: number;
271
+ https: number;
272
+ ftp: number;
273
+ };
274
+ export type Html5Mode = {
275
+ enabled: boolean;
276
+ requireBase: boolean;
277
+ rewriteLinks: boolean | string;
278
+ };
210
279
  import { JQLite } from "../../shared/jqlite/jqlite";
@@ -1,13 +1,32 @@
1
1
  /**
2
- * @ngdoc provider
3
- * @name $qProvider
4
- *
5
- *
6
- * @description
2
+ * @template T
3
+ * @typedef {Object} QPromise
4
+ * @property {function(
5
+ * ((value: T) => (PromiseLike<never>|PromiseLike<T>|T))|null,
6
+ * ((reason: any) => (PromiseLike<never>|PromiseLike<T>|T))|null,
7
+ * ((state: any) => any)
8
+ * ): QPromise<T|never>} then - Calls one of the success or error callbacks asynchronously as soon as the result is available.
9
+ * @property {function(
10
+ * ((value: T) => (QPromise<never>|QPromise<T>|T))|null,
11
+ * ((reason: any) => (QPromise<never>|QPromise<never>|never))|null,
12
+ * ((state: any) => any)
13
+ * ): QPromise<T|never>} then - Calls one of the success or error callbacks asynchronously as soon as the result is available.
14
+ * @property {function(((reason: any) => (PromiseLike<never>|PromiseLike<T>|T))|null): QPromise<T>|T} catch - Shorthand for promise.then(null, errorCallback).
15
+ * @property {function(((reason: any) => (QPromise<never>|QPromise<T>|T))|null): QPromise<T>|T} catch - Shorthand for promise.then(null, errorCallback).
16
+ * @property {function(function(): void): QPromise<T>} finally - Allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value.
17
+ * @property {number} [$$intervalId] - Internal id set by the $interval service for callback notifications
18
+ */
19
+ /**
20
+ *@template T
21
+ * @typedef {Object} Deferred
22
+ * @property {function(T|QPromise<T>): void} resolve - Resolves the promise with a value or another promise.
23
+ * @property {function(any): void} reject - Rejects the promise with a reason.
24
+ * @property {function(any): void} notify - Provides a progress notification.
25
+ * @property {QPromise<T>} promise - The promise associated with this deferred object.
7
26
  */
8
27
  export function $QProvider(): void;
9
28
  export class $QProvider {
10
- $get: (string | (($rootScope: any, $exceptionHandler: import("../exception-handler").ErrorHandler) => any))[];
29
+ $get: (string | (($rootScope: import("../scope/scope").Scope, $exceptionHandler: import("../exception-handler").ErrorHandler) => any))[];
11
30
  /**
12
31
  * @ngdoc method
13
32
  * @name $qProvider#errorOnUnhandledRejections
@@ -29,37 +48,39 @@ export class $$QProvider {
29
48
  errorOnUnhandledRejections: (value: any) => boolean | this;
30
49
  }
31
50
  export function markQExceptionHandled(q: any): void;
32
- export namespace angular {
33
- type QPromise<T> = {
34
- /**
35
- * - Calls one of the success or error callbacks asynchronously as soon as the result is available.
36
- */
37
- then: (arg0: ((value: T) => (PromiseLike<never> | PromiseLike<T> | T)) | null, arg1: ((reason: any) => (PromiseLike<never> | PromiseLike<T> | T)) | null, arg2: ((state: any) => any)) => angular.QPromise<T | never>;
38
- /**
39
- * - Shorthand for promise.then(null, errorCallback).
40
- */
41
- catch: (arg0: ((reason: any) => (PromiseLike<never> | PromiseLike<T> | T)) | null) => angular.QPromise<T> | T;
42
- /**
43
- * - Allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value.
44
- */
45
- finally: (arg0: () => void) => angular.QPromise<T>;
46
- };
47
- type Deferred<T> = {
48
- /**
49
- * - Resolves the promise with a value or another promise.
50
- */
51
- resolve: (arg0: T | angular.QPromise<T>) => void;
52
- /**
53
- * - Rejects the promise with a reason.
54
- */
55
- reject: (arg0: any) => void;
56
- /**
57
- * - Provides a progress notification.
58
- */
59
- notify: (arg0: any) => void;
60
- /**
61
- * - The promise associated with this deferred object.
62
- */
63
- promise: angular.QPromise<T>;
64
- };
65
- }
51
+ export type QPromise<T> = {
52
+ /**
53
+ * - Calls one of the success or error callbacks asynchronously as soon as the result is available.
54
+ */
55
+ then: (arg0: ((value: T) => (PromiseLike<never> | PromiseLike<T> | T)) | null, arg1: ((reason: any) => (PromiseLike<never> | PromiseLike<T> | T)) | null, arg2: ((state: any) => any)) => QPromise<T | never>;
56
+ /**
57
+ * - Shorthand for promise.then(null, errorCallback).
58
+ */
59
+ catch: (arg0: ((reason: any) => (PromiseLike<never> | PromiseLike<T> | T)) | null) => QPromise<T> | T;
60
+ /**
61
+ * - Allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value.
62
+ */
63
+ finally: (arg0: () => void) => QPromise<T>;
64
+ /**
65
+ * - Internal id set by the $interval service for callback notifications
66
+ */
67
+ $$intervalId?: number;
68
+ };
69
+ export type Deferred<T> = {
70
+ /**
71
+ * - Resolves the promise with a value or another promise.
72
+ */
73
+ resolve: (arg0: T | QPromise<T>) => void;
74
+ /**
75
+ * - Rejects the promise with a reason.
76
+ */
77
+ reject: (arg0: any) => void;
78
+ /**
79
+ * - Provides a progress notification.
80
+ */
81
+ notify: (arg0: any) => void;
82
+ /**
83
+ * - The promise associated with this deferred object.
84
+ */
85
+ promise: QPromise<T>;
86
+ };
@@ -284,12 +284,12 @@ export class Scope {
284
284
  *
285
285
  * - `string`: Evaluated as {@link guide/expression expression}
286
286
  * - `function(scope)`: called with current `scope` as a parameter.
287
- * @param {WatchListener} listener
287
+ * @param {WatchListener} [listener]
288
288
  * @param {boolean=} [objectEquality=false] Compare for object equality using {@link angular.equals} instead of
289
289
  * comparing for reference equality.
290
290
  * @returns {function()} Returns a deregistration function for this listener.
291
291
  */
292
- $watch(watchExp: string | ((scope: Scope) => any), listener: WatchListener, objectEquality?: boolean | undefined): () => any;
292
+ $watch(watchExp: string | ((scope: Scope) => any), listener?: WatchListener, objectEquality?: boolean | undefined): () => any;
293
293
  /**
294
294
  * @ngdoc method
295
295
  * @name $rootScope.Scope#$watchGroup
@@ -591,14 +591,14 @@ export class Scope {
591
591
  * will be scheduled. However, it is encouraged to always call code that changes the model
592
592
  * from within an `$apply` call. That includes code evaluated via `$evalAsync`.
593
593
  *
594
- * @param {(string|function())=} expr An AngularTS expression to be executed.
594
+ * @param {(string|function(any):any)=} expr An AngularTS expression to be executed.
595
595
  *
596
596
  * - `string`: execute using the rules as defined in {@link guide/expression expression}.
597
597
  * - `function(scope)`: execute the function with the current `scope` parameter.
598
598
  *
599
599
  * @param {(object)=} locals Local variables object, useful for overriding values in scope.
600
600
  */
601
- $evalAsync(expr?: (string | (() => any)) | undefined, locals?: (object) | undefined): any;
601
+ $evalAsync(expr?: (string | ((arg0: any) => any)) | undefined, locals?: (object) | undefined): any;
602
602
  /**
603
603
  * @ngdoc method
604
604
  * @name $rootScope.Scope#$applyAsync
@@ -670,10 +670,7 @@ export class Scope {
670
670
  * @returns {*} The result of evaluating the expression.
671
671
  */
672
672
  $eval(expr?: string | ((arg0: Scope) => any), locals?: (object) | undefined): any;
673
- /**
674
- * @private
675
- */
676
- private $$postDigest;
673
+ $$postDigest(fn: any): void;
677
674
  /**
678
675
  * @private
679
676
  */
@@ -91,3 +91,7 @@ export function urlsAreSameOrigin(url1: string | any, url2: string | object): bo
91
91
  * @returns {string}
92
92
  */
93
93
  export function getBaseUrl(): string;
94
+ /**
95
+ * HTTP protocol
96
+ */
97
+ export type HttpProtocol = "http" | "https";
@@ -25,6 +25,17 @@ export class Param {
25
25
  /** Returns true if a the parameter values are valid, according to the Param definitions */
26
26
  static validates(params: any, values?: {}): any;
27
27
  constructor(id: any, type: any, location: any, urlConfig: any, state: any);
28
+ isOptional: boolean;
29
+ type: any;
30
+ location: any;
31
+ id: any;
32
+ dynamic: boolean;
33
+ raw: boolean;
34
+ squash: any;
35
+ replace: any;
36
+ inherit: boolean;
37
+ array: any;
38
+ config: any;
28
39
  isDefaultValue(value: any): any;
29
40
  /**
30
41
  * [Internal] Gets the decoded representation of a value if the value is defined, otherwise, returns the