-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(router-store): selectors should return MemoizedSelector (#2492)
- Loading branch information
1 parent
1925308
commit 39a4b91
Showing
1 changed file
with
10 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
import { Data, Params } from '@angular/router'; | ||
import { MemoizedSelector } from '@ngrx/store'; | ||
|
||
export interface RouterStateSelectors<V> { | ||
selectCurrentRoute: (state: V) => any; | ||
selectQueryParams: (state: V) => Params; | ||
selectQueryParam: (param: string) => (state: V) => string | undefined; | ||
selectRouteParams: (state: V) => Params; | ||
selectRouteParam: (param: string) => (state: V) => string | undefined; | ||
selectRouteData: (state: V) => Data; | ||
selectUrl: (state: V) => string; | ||
selectCurrentRoute: MemoizedSelector<V, any>; | ||
selectQueryParams: MemoizedSelector<V, Params>; | ||
selectQueryParam: (param: string) => MemoizedSelector<V, string | undefined>; | ||
selectRouteParams: (state: V) => MemoizedSelector<V, Params>; | ||
selectRouteParam: ( | ||
param: string | ||
) => (state: V) => MemoizedSelector<V, string | undefined>; | ||
selectRouteData: (state: V) => MemoizedSelector<V, Data>; | ||
selectUrl: (state: V) => MemoizedSelector<V, string>; | ||
} |