@@ -15,12 +15,15 @@ export class UrlService {
1515 globals : import ( "../router.js" ) . RouterProvider ,
1616 urlConfigProvider : import ( "../../router/url/url-config.js" ) . UrlConfigProvider ,
1717 ) ;
18- /** @type {ng.LocationService } */
19- $location : ng . LocationService ;
18+ /** @type {ng.LocationService | undefined } */
19+ $location : ng . LocationService | undefined ;
2020 /** @private */
2121 private _locationProvider ;
2222 stateService : import ( "../../router/state/state-service.js" ) . StateProvider ;
23- /** @type {UrlRuleFactory } Provides services related to the URL */
23+ /**
24+ * @type {UrlRuleFactory } Provides services related to the URL
25+ * @ignore
26+ */
2427 _urlRuleFactory : UrlRuleFactory ;
2528 /**
2629 * The nested [[UrlRules]] API for managing URL rules and rewrites
@@ -30,12 +33,20 @@ export class UrlService {
3033 _rules : UrlRules ;
3134 /**
3235 * The nested [[UrlConfig]] API to configure the URL and retrieve URL information
36+ * @ignore
3337 * @type {import("./url-config.js").UrlConfigProvider }
3438 */
3539 _config : import ( "./url-config.js" ) . UrlConfigProvider ;
36- /** @type {ParamFactory } Creates a new [[Param]] for a given location (DefType) */
40+ /**
41+ * @type {ParamFactory } Creates a new [[Param]] for a given location (DefType)
42+ * @ignore
43+ */
3744 _paramFactory : ParamFactory ;
38- _urlListeners : any [ ] ;
45+ /**
46+ * @type {((evt: ng.ScopeEvent) => void)[] }
47+ * @ignore
48+ */
49+ _urlListeners : ( ( evt : ng . ScopeEvent ) => void ) [ ] ;
3950 /**
4051 * Gets the path part of the current url
4152 *
@@ -136,8 +147,8 @@ export class UrlService {
136147 * let deregisterFn = locationServices.onChange((evt) => console.log("url change", evt));
137148 * ```
138149 *
139- * @param {Function } callback a function that will be called when the url is changing
140- * @return {Function } a function that de-registers the callback
150+ * @param {(evt: ng.ScopeEvent) => void } callback a function that will be called when the url is changing
151+ * @return {() => void } a function that de-registers the callback
141152 */
142153 private onChange ;
143154 /**
@@ -236,19 +247,19 @@ export class UrlService {
236247 /**
237248 * Creates a [[UrlMatcher]] for the specified pattern.
238249 *
239- * @param urlPattern The URL pattern.
240- * @param config The config object hash.
250+ * @param { string } urlPattern The URL pattern.
251+ * @param { * } [ config] The config object hash.
241252 * @returns The UrlMatcher.
242253 */
243- compile ( urlPattern : any , config : any ) : UrlMatcher ;
254+ compile ( urlPattern : string , config ? : any ) : UrlMatcher ;
244255 /**
245256 * Returns true if the specified object is a [[UrlMatcher]], or false otherwise.
246257 *
247- * @param object The object to perform the type check against.
258+ * @param { UrlMatcher & Record<string, any> } object The object to perform the type check against.
248259 * @returns `true` if the object matches the `UrlMatcher` interface, by
249260 * implementing all the same methods.
250261 */
251- isMatcher ( object : any ) : boolean ;
262+ isMatcher ( object : UrlMatcher & Record < string , any > ) : boolean ;
252263}
253264import { UrlRuleFactory } from "./url-rule.js" ;
254265import { UrlRules } from "./url-rules.js" ;
0 commit comments