Skip to content

Commit

Permalink
fix(router-store): selectors should return MemoizedSelector (#2492)
Browse files Browse the repository at this point in the history
  • Loading branch information
timdeschryver authored Apr 18, 2020
1 parent 1925308 commit 39a4b91
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions modules/router-store/src/models.ts
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>;
}

0 comments on commit 39a4b91

Please sign in to comment.