Skip to content

Signal store not see feature requirements #5125

@frenzymind

Description

@frenzymind

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

signals

Minimal reproduction of the bug/regression with instructions

stackblitz

When I specify type in my withCRUD feature the error occurs of incorrect type, that there is no _http property in store. If ignore the error, in main.ts file no error and type of create function changed correctly.

During creation this issue I suddenly found if move withState after withCRUD - all works fine. I understand order is matter, but I give required prop before. So, any extra field will fall into error?

if I declare extra requirement in withCRUD, for example: state: type<{ foo: number }>() then I have to specify withState({ foo: 42, }) first, then withCRUD and just after this step I can to declare other state fields I need. Otherwise there is always be an error.
I always think I have to present all required fields and any extra are welcome, like with ts interfaces. I was wrong?

This is expected ?

Thanks for you time!

Expected behavior

No error

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

"@ngrx/signals": "^21.0.1"
"@angular/core": "^21.0.6",

Other information

No response

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

  • Yes
  • No

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions