NGRX Traits is a library to help you compose and reuse state logic in your angular app. There is two versions, @ngrx-traits/signals supports ngrx-signals, and @ngrx-traits/{core, common} supports ngrx.
Executed by Nx with the command 'nx migrate 15.9.3', the latest non-major version of v15
Fix Typescript Issue following migration from 4.7.4 to 4.9.5
Constraining function input
TraitFactory: Contraining KC to AllTraitConfigs
TraitFactory type infer the type of KC and pass it to is composed part Factory, who constrain it to AllTraitConfigs.
Despite the usage and default assignement, since there's no constraint placed on 'KC', it could be assign any type that could not respect the AllTraitConfigs.
Adding a contraint like shown below fix the issue.
Executed by Nx with the command 'nx migrate 15.9.3', the latest non-major version of v15
Fix Typescript Issue following migration from 4.7.4 to 4.9.5
Constraining function input
TraitFactory: Contraining
KC
to AllTraitConfigsTraitFactory
type infer the type ofKC
and pass it to is composed part Factory, who constrain it toAllTraitConfigs
.Despite the usage and default assignement, since there's no constraint placed on 'KC', it could be assign any type that could not respect the AllTraitConfigs.
Adding a contraint like shown below fix the issue.
It would be possible to use
KeyedConfig<KEY, C>
as constraint, Typescript doesn't complain, but I'll let the owner that those actions.Files with those modification:
fix: Fix jest-marble test error by migrating from 2.5.1 to 3.0.6
fix: Fix RxJS error following it's migration from 6.6.0 to 7.8.1
WIP