Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Chaining functions _does_ need this though, in current Typescript. The pipe function has to enforce some really complex constraints (inner types between siblings/fn args). There's really no other "correct" way to write this without calling it a day and just doing a generic for different amount of args (<A>, <A, B>, <A, B, C>, etc).

I agree it's complex, but necessary for a utility like this if you want correctness for arbitrary N args



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: