ngrx/platform

`withProps` doesn't allow Symbols as keys

Closed this issue · 1 comments

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

signals

Minimal reproduction of the bug/regression with instructions

signalStore skips any symbols of withProps.

In this example, secret is undefined

const SECRET = Symbol('SECRET');

const Store = signalStore(withProps(() => ({ [SECRET]: 'secret' })));

@Component({
  selector: 'app-root',
  template: `Secret: {{ secret }}`,
  providers: [Store],
})
export class App {
  protected store = inject(Store);
  protected secret = this.store[SECRET];
}

https://stackblitz.com/edit/github-wnvurbbx?file=src%2Fmain.ts

Expected behavior

Symbols should be used as well

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

NgRx 19, Angular 19

Other information

No response

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

  • Yes
  • No