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

patchState overload that takes a function does not enforce type safety #4671

Open
1 of 2 tasks
EthanSK opened this issue Jan 11, 2025 · 0 comments
Open
1 of 2 tasks

Comments

@EthanSK
Copy link

EthanSK commented Jan 11, 2025

Which @ngrx/* package(s) are the source of the bug?

signals

Minimal reproduction of the bug/regression with instructions

      patchState(store, (state) => ({
               'field not in type': ":(" //this is allowed
           
              })),

Expected behavior

It should complain if the field is not in the state's type.
The version of patchState that doesn't take a function but instead an object as 2nd param complains as expected

Versions of NgRx, Angular, Node, affected browser(s) and operating system(s)

ngrx 19, angular 19, node 21, macos

Other information

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No
@EthanSK EthanSK changed the title patchStatev version that takes a function does not enforce type safety patchState overload that takes a function does not enforce type safety Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant