ngrx / platform

Reactive State for Angular

Home Page:https://ngrx.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@ngrx/signals: Add migration schematic for `StateSignal`

brandonroberts opened this issue · comments

The migration schematic should replace StateSignal usages with WritableStateSource:

-import { StateSignal, patchState } from '@ngrx/signals';
+import { WritableStateSource, patchState } from '@ngrx/signals';

-function updateCount(state: StateSignal<{ count: number }>, count: number): void {
+function updateCount(state: WritableStateSource<{ count: number }>, count: number): void {
  patchState(state, { count });
}