-
Notifications
You must be signed in to change notification settings - Fork 6
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
ngrx-slice Can't infer types of selectors when used inside a buildable nx library with @nrwl/angular:webpack-browser executor #2
Comments
Hey @fatihdogmus , thank you for reporting. To be quite honest, this seems weird. However, to unlock you, I think I can force |
Yes that is correct. I pinned the problem to Setting it to any might solve the problem. But won't changing it to any be problematic, since it won't be as type safe? |
@fatihdogmus Not entirely. The type inference should work the same for any / unknown. |
Sure if you have time, I would be glad to try it 🙂 |
Hey @fatihdogmus , it looks like it can also be an issue with pnpm and how it resolves dependencies ( |
I really don't like npm package structure 🙂 yes it worked both on the demo repo and in our own actual repo. Thank you for the pointer and your time. I love dealing with obscure problems of package managers on friday 🙂 |
yeah I'm a pnpm user myself :( not sure how to debug this on a Friday haha. I'll reach out to Colum/Leo on our team (they work on incremental build for Angular) and see if they have any idea |
Hello Chau, sorry to bother you again 🙂
I've been trying to migrate our application to support incremental builds with buildable libraries, and been following this tutorial on how to do it: https://nx.dev/ci/setup-incremental-builds-angular
Everything works, except the ngrx-slice selector types are inferred as unknown by typescript on build time, and can't assign them to any variables, giving this error:
The project works fine with either serve command or with default executor.
Here is a repo to reproduce: https://github.com/fatihdogmus/ngrx-slice-type-inference-error
Run pnpm install && pnpm build on repo to reproduce
I didn't know where is the problem, ngrx-slice, ngrx or nx itself, but since you are involved with all of them, I thought you could point me to right direction 🙂
Thank you very much.
The text was updated successfully, but these errors were encountered: