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

Add async throwing closure initializer for Result #2623

Closed

Conversation

Ryu0118
Copy link
Contributor

@Ryu0118 Ryu0118 commented Dec 6, 2023

The CasePathable macro eliminates the need to make the Action conform to Equatable, and the TaskResult is now deprecated.
However, the current TCA does not provide a complete replacement for TaskResult, and an extension to the Result must be created in each individual project.
I believe that this initializer should be added to TCA since it is most often used in an async effect being returned from a reducer.

@stephencelis
Copy link
Member

stephencelis commented Dec 6, 2023

@Ryu0118 Thanks for exploring and taking the time to PR 😄 We actually snuck this initializer into our ConcurrencyExtras module here: pointfreeco/swift-concurrency-extras#15

This module should be exported by TCA, so long as you're on version 1.1+, so I think it should already be available. Is it not working for you?

@Ryu0118
Copy link
Contributor Author

Ryu0118 commented Dec 6, 2023

Thanks!
I missed it 😅. I will close this PR.

@Ryu0118 Ryu0118 closed this Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants