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.
MIT License
44
stars
3
forks
source link
withCalls typedCallsConfig call losses param in "strictNullChecks": false #82
After the last 17.4.0 when in "strictNullChecks": false, the following code generates a method with no params
export const UserStore = signalStore( { providedIn: 'root' }, withState(() => initialState), withCalls((state) => { return { deleteUser: typedCallConfig({ call: ({ id }: { id: string }) => { console.log(id); return of(''); }, storeResult: false, onSuccess: (result, s) => {}, onError: (error) => {}, }), }; }), ); const store = new UserStore(); store.deleteUser({ id: '1' }); // <--- error method has no params