Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MemoizedSelectorWithProps type error when used in store.select #1386

Closed
alex-okrushko opened this issue Oct 29, 2018 · 0 comments · Fixed by #1387
Closed

MemoizedSelectorWithProps type error when used in store.select #1386

alex-okrushko opened this issue Oct 29, 2018 · 0 comments · Fixed by #1387

Comments

@alex-okrushko
Copy link
Member

Minimal reproduction of the bug/regression with instructions:

Selectors with Prop produce TS compile error: Argument of type 'MemoizedSelectorWithProps<object, any, any>' is not assignable to parameter of type 'string'. when used with store.select(...).

   name$ = this.store.select(selectors.selectorWithProp, propValue);

When used with store.pipe(select(...)) it works fine.

   name$ = this.store.select.pipe(select(selectors.selectorWithProp, propValue));

https://stackblitz.com/edit/angular-huevzn?file=src%2Fapp%2Fapp.component.ts

Uncomment the other usage to see the TS error.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants