Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

withCalls should allow private methods #142

Closed
francobasilico opened this issue Sep 26, 2024 · 1 comment · Fixed by #143
Closed

withCalls should allow private methods #142

francobasilico opened this issue Sep 26, 2024 · 1 comment · Fixed by #143
Assignees
Labels

Comments

@francobasilico
Copy link
Collaborator

A method defined within the withCalls could be private, meaning that it's only called in the store. But the signals and computed should still be available.

Example

withCalls((store,  dataService = inject(WebCoreDataAccessService)) => ({
    _loadQuoteRequest: typedCallConfig({
      call: (id) =>
        dataService.getShipperFtlQuoteRequest({ id }).pipe(map((r) => r.data.quoteRequest)),

      mapPipe: 'switchMap',
      resultProp: 'quoteRequest',
    }),
  })),

Currently method _loadQuoteRequest is not exported but the signals/computed are wrongly named.

image

@gabrielguerrero gabrielguerrero added enhancement New feature or request signals labels Sep 26, 2024
gabrielguerrero pushed a commit that referenced this issue Sep 26, 2024
Add support for private methods (methods with _ in the start of the name) to withCalls

fix #142
Copy link

🎉 This issue has been resolved in version 18.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants