|
| 1 | +<a name="19.0.0-rc.0"></a> |
| 2 | + |
| 3 | +# [19.0.0-rc.0](https://github.com/ngrx/platform/compare/19.0.0-beta.0...19.0.0-rc.0) (2024-12-10) |
| 4 | + |
| 5 | +### Bug Fixes |
| 6 | + |
| 7 | +- **eslint-plugin:** support ESM modudule syntax (.mjs) ([e2f35c8](https://github.com/ngrx/platform/commit/e2f35c8)) |
| 8 | +- **signals:** create deep signals for custom class instances ([#4614](https://github.com/ngrx/platform/issues/4614)) ([4d34dc4](https://github.com/ngrx/platform/commit/4d34dc4)), closes [#4604](https://github.com/ngrx/platform/issues/4604) |
| 9 | + |
| 10 | +### Features |
| 11 | + |
| 12 | +- **eslint-plugin:** add new rule require-super-ondestroy ([#4611](https://github.com/ngrx/platform/issues/4611)) ([2ac4372](https://github.com/ngrx/platform/commit/2ac4372)), closes [#4505](https://github.com/ngrx/platform/issues/4505) |
| 13 | +- **signals:** add `signalMethod` ([#4597](https://github.com/ngrx/platform/issues/4597)) ([bdd1d3e](https://github.com/ngrx/platform/commit/bdd1d3e)), closes [#4581](https://github.com/ngrx/platform/issues/4581) |
| 14 | +- **signals:** add `withProps` base feature ([#4607](https://github.com/ngrx/platform/issues/4607)) ([e626082](https://github.com/ngrx/platform/commit/e626082)) |
| 15 | +- **signals:** add migration for `withProps` ([#4612](https://github.com/ngrx/platform/issues/4612)) ([5f803d0](https://github.com/ngrx/platform/commit/5f803d0)), closes [#4608](https://github.com/ngrx/platform/issues/4608) |
| 16 | +- **store:** enable dispatching actions on signal changes ([#4600](https://github.com/ngrx/platform/issues/4600)) ([2528d39](https://github.com/ngrx/platform/commit/2528d39)), closes [#4537](https://github.com/ngrx/platform/issues/4537) |
| 17 | + |
| 18 | +### BREAKING CHANGES |
| 19 | + |
| 20 | +- **signals:** - The `computed` property in `SignalStoreFeatureResult` type is renamed to `props`. |
| 21 | + |
| 22 | +* The `EntityComputed` and `NamedEntityComputed` types in the `entities` plugin are renamed to `EntityProps` and `NamedEntityProps`. |
| 23 | + |
| 24 | +BEFORE: |
| 25 | + |
| 26 | +```ts |
| 27 | +import { computed, Signal } from '@angular/core'; |
| 28 | +import { signalStoreFeature, SignalStoreFeature, type, withComputed } from '@ngrx/signals'; |
| 29 | +import { EntityComputed } from '@ngrx/signals/entities'; |
| 30 | + |
| 31 | +export function withTotalEntities<Entity>(): SignalStoreFeature<{ state: {}; computed: EntityComputed<Entity>; methods: {} }, { state: {}; computed: { total: Signal<number> }; methods: {} }> { |
| 32 | + return signalStoreFeature( |
| 33 | + { computed: type<EntityComputed<Entity>>() }, |
| 34 | + withComputed(({ entities }) => ({ |
| 35 | + total: computed(() => entities().length), |
| 36 | + })) |
| 37 | + ); |
| 38 | +} |
| 39 | +``` |
| 40 | + |
| 41 | +AFTER: |
| 42 | + |
| 43 | +```ts |
| 44 | +import { computed, Signal } from '@angular/core'; |
| 45 | +import { signalStoreFeature, SignalStoreFeature, type, withComputed } from '@ngrx/signals'; |
| 46 | +import { EntityProps } from '@ngrx/signals/entities'; |
| 47 | + |
| 48 | +export function withTotalEntities<Entity>(): SignalStoreFeature<{ state: {}; props: EntityProps<Entity>; methods: {} }, { state: {}; props: { total: Signal<number> }; methods: {} }> { |
| 49 | + return signalStoreFeature( |
| 50 | + { props: type<EntityProps<Entity>>() }, |
| 51 | + withComputed(({ entities }) => ({ |
| 52 | + total: computed(() => entities().length), |
| 53 | + })) |
| 54 | + ); |
| 55 | +} |
| 56 | +``` |
| 57 | + |
1 | 58 | <a name="19.0.0-beta.0""></a>
|
2 | 59 |
|
3 | 60 | # [19.0.0-beta.0"](https://github.com/ngrx/platform/compare/18.1.1...19.0.0-beta.0") (2024-11-20)
|
|
0 commit comments