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
After some time thinking about this, I realized that (almost) all Observables have a return value.
So, to make this "fix" useful this this would also imply that all types should be accepted as argument?
For now, a workaround would be to create an unknown effect.
@timdeschryver Isn't it a bit misleading though? The unknown value will never be used but the effect will accept anything (number, string, etc...). Concerning void - if the argument will be optional wouldn't it solve both? You can pass nothing or an observable compared to number which require a number or observable of numbers.
If there is an observable the returns a number but the effect has no need for it - then unknown might work or just use number and ignore it.
Anyway currently unknown just break out of type checking accepting unknown and not observable of unknown.
Minimal reproduction of the bug/regression with instructions
An effect with void type argument cannot accept observables as opposed t other types.
Minimal reproduction of the bug/regression with instructions
Allow passing an observable of type void or nothing.
Versions of NgRx, Angular, Node, affected browser(s) and operating system(s)
Ngrx 13 with Angular 13
Other information
Originated from discord discussion: https://discord.com/channels/740557383109050469/740560647967866912/988876322086481933
I would be willing to submit a PR to fix this issue
The text was updated successfully, but these errors were encountered: