gabrielguerrero / ngrx-traits

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

Closed gabrielguerrero closed 1 month ago

gabrielguerrero commented 1 month ago

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

github-actions[bot] commented 1 month ago

:tada: This issue has been resolved in version 17.4.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: