Replies: 1 comment 3 replies
-
I recently explored Effect for error handling and noticed that it also uses pipelines to chain operations by applying different functions within a Their documentation highlights tree shakability and extensibility as key advantages of using functions over methods. I really like the idea of a Pipe-API, but it's important to remember that this library aims to bring CSharpFunctionalExtensions to the TypeScript ecosystem (as far as I understand). Adopting this change would shift the programming style away from method chaining, which is a core aspect of CSharpFunctionalExtensions. However, I think both approaches are similar enough and easy to understand, making the benefits of a pipeline-based style a reasonable trade-off. |
Beta Was this translation helpful? Give feedback.
-
Warning
Disclaimer this issue exists to dump an idea, I know @seangwright already have experminented with. This issue is not planned to be implemented by us. However, I want to share this ideas. If there is a hero who want to take responsibility: You are kindly invited to work with us!
Type-System Rework
Currently, we have
Result
. A Result can be a success or a failure.If a result is a success, it has a value, but no error.
If a result is a failure, it has an error, but no value.
For now, we cannot reflect this in our API.
It would be great to have a save access to the properties that exist.
Pipe-API
I am a big fan of the API-Design of https://valibot.dev/guides/introduction/.
It has the most type-safe API I am aware of.
It composes functions with each other, making the library tree-shakable.
Adopting this approach would allow splitting
Result
&ResultAsync
.The world of Signal-APIs
I am wondering, how typescript-functional-extensions fit in frontend frameworks. The last years each framework has its own mechanism (Observables, References, effects, “compiler-magic”).
With signals, a lot of Frameworks kinds of agree on a standard.
We could think about how typescript-functional-extensions can be easily used with signal-APIs and provide either utility-functions or at least a guide how code quality and safety can be improved with typescript-functional-extensions.
Beta Was this translation helpful? Give feedback.
All reactions