Skip to content

Commit fb678bf

Browse files
refactor: update types for inject api functions
1 parent df543d0 commit fb678bf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libs/router/src/lib/route-params.service.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function compareParams(previous: Params, current: Params): boolean {
2222
*
2323
* @returns RoutePath
2424
*/
25-
export function getRoutePath<T extends string = string>() {
25+
export function getRoutePath<T extends string = string>(): Observable<T> {
2626
return inject<RoutePath<T>>(RoutePath);
2727
}
2828

@@ -31,7 +31,7 @@ export function getRoutePath<T extends string = string>() {
3131
*
3232
* @returns RouteParams
3333
*/
34-
export function getRouteParams<T extends Params = Params>() {
34+
export function getRouteParams<T extends Params = Params>(): Observable<T> {
3535
return inject<RouteParams<T>>(RouteParams);
3636
}
3737

@@ -40,6 +40,6 @@ export function getRouteParams<T extends Params = Params>() {
4040
*
4141
* @returns QueryParams
4242
*/
43-
export function getQueryParams<T extends Params = Params>() {
43+
export function getQueryParams<T extends Params = Params>(): Observable<T> {
4444
return inject<QueryParams<T>>(QueryParams);
4545
}

0 commit comments

Comments
 (0)