Comment by wk_end
4 days ago
The default any return type from pipelines is kind of brutal. Seems like a real footgun. Is that fixable?
4 days ago
The default any return type from pipelines is kind of brutal. Seems like a real footgun. Is that fixable?
That’s a fair point — it can definitely become a footgun if you’re not careful.
This happens because `runPipeResult` defaults its generic parameter to `R = any`. When type safety matters, the intended solution is to use `pipeSideEffectStrict`, which preserves all possible SideEffect result types as a precise union throughout the pipeline.
The default version prioritizes ergonomics and simplicity, while the strict version prioritizes type safety.
Also, fp-pack is still in an early stage, so the usability and API choices haven’t been fully validated yet. That’s why feedback like this is especially helpful in shaping the direction of the library.