Skip to content

Commit

Permalink
fix: update versions (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
timdeschryver authored Jul 11, 2024
1 parent 6435bc2 commit f4e82e3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@
"postbuild": "cpy README.md LICENSE dist && cpy schematics ../../dist --parents --cwd=src"
},
"devDependencies": {
"@angular/compiler": "^17.0.0",
"@angular/compiler-cli": "^17.0.0",
"@angular/core": "^17.0.0",
"@ngrx/component-store": "^17.0.0",
"@ngrx/signals": "^17.1.1",
"@ngrx/store": "^17.0.0",
"@angular/compiler": "^18.0.0",
"@angular/compiler-cli": "^18.0.0",
"@angular/core": "^18.0.0",
"@ngrx/component-store": "^18.0.0",
"@ngrx/signals": "^18.0.0-rc.2",
"@ngrx/store": "^18.0.0",
"@types/jest": "^29.5.12",
"cpy-cli": "^5.0.0",
"immer": "^10.0.3",
"jest": "^29.7.0",
"jest-preset-angular": "^14.0.3",
"ng-packagr": "^17.0.0",
"ng-packagr": "^18.0.0",
"prettier": "^3.2.5",
"rimraf": "^5.0.5",
"rxjs": "~7.8.1",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.0.0",
"tsm": "^2.3.0",
"typescript": "5.3.3",
"typescript": "5.4.5",
"uvu": "^0.5.6"
}
}
3 changes: 2 additions & 1 deletion src/signals/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ function toFullStateUpdater<State extends object>(updater: PartialStateUpdater<S
};
}

export function immerPatchState<State extends object>(state: StateSignal<State>, ...updaters: Array<Partial<State & {}> | PartialStateUpdater<State & {}> | ImmerStateUpdater<State & {}>>) {
type Prettify<T> = { [K in keyof T]: T[K] } & {};
export function immerPatchState<State extends object>(state: StateSignal<State>, ...updaters: Array<Partial<Prettify<State>> | PartialStateUpdater<Prettify<State>> | ImmerStateUpdater<Prettify<State>>>) {
const immerUpdaters = updaters.map(updater => {
if (typeof updater === 'function') {
return immerReducer(toFullStateUpdater(updater)) as unknown as PartialStateUpdater<State & {}>;
Expand Down

0 comments on commit f4e82e3

Please sign in to comment.