You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
selectQueryParam, selectRouteParams, selectRouteParam, selectRouteData, selectUrl selectors now seem to be factory functions that return selectors.
While that is correct for selectQueryParam and selectRouteParam, all of them expose additional (state: V) => layer that actually is part of MemoizedSelector.
9.1.1 (more specifically 39a4b91) introduced regression.
selectQueryParam
,selectRouteParams
,selectRouteParam
,selectRouteData
,selectUrl
selectors now seem to be factory functions that return selectors.While that is correct for
selectQueryParam
andselectRouteParam
, all of them expose additional(state: V) =>
layer that actually is part of MemoizedSelector.This breaks typings selector usages and makes TypeScript think that, for example
selectUrl
returns a MemoizedSelector and not just string.Functionality remains functional, only thing broken is the https://github.com/ngrx/platform/blob/master/modules/router-store/src/models.ts interface.
Long story short
(state: V) => MemoizedSelector<V, whatever>
selectors should be justMemoizedSelector<V, whatever>
.Entity selectors are probably similarly affected.
Expected behavior:
It should be possible to use
selectUrl
increateSelector
and expect returned value to be a string without having to do workarounds like:Versions of NgRx, Angular, Node, affected browser(s) and operating system(s):
ngrx: 9.1.1
Angular: 9.1.4
Node: 14.0.0
I would be willing to submit a PR to fix this issue
[x] Yes (Assistance is provided if you need help submitting a pull request)
[ ] No
The text was updated successfully, but these errors were encountered: