seasonedcc / composable-functions

Types and functions to make composition easy and safe
MIT License
649 stars 13 forks source link

Fix composable pipe for async functions #129

Closed diogob closed 7 months ago

diogob commented 7 months ago

The types PipeArguments and PipeReturn were not taking into account async composables (the runtime already had the proper awaits though).

The fix using Awaited caused functions returning never to type check, so I introduced the IsNever and handled those cases separately.