How to use advanced Typescript to define a `pipe` function

This page summarizes the projects mentioned and recommended in the original post on

Our great sponsors
  • InfluxDB - Build time-series-based applications quickly and at scale.
  • Zigi - The context switching struggle is real
  • Sonar - Write Clean JavaScript Code. Always.
  • Scout APM - Truly a developer’s best friend
  • fp-ts

    Functional programming in TypeScript

    But unfortunately that's where most libraries have issues. Ideed, if you look closely at fp-ts or lodash pipe implementations you'll see that typescript support has a limited function count support. For fp-ts, after 19 composed functions, you'll have no more type checking. For lodash, it's even worse, only 9 functions are supported. This is because these libraries are using typescript function overload definition instead of recursive typescript definitions.

  • TypeScript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    This is advanced typescript for library authors. By adding this kind of type definition you can improve your type definitions for advanced functionnal code. I'd like to emphasize that typescript type system is Turing complete, so if you think some advanced typing is impossible to do with typescript, you should think twice. Because chances are that you can. It might not be easy and i hope Typescript will improve on this part.

  • InfluxDB

    Build time-series-based applications quickly and at scale.. InfluxDB is the Time Series Data Platform where developers build real-time applications for analytics, IoT and cloud-native services in less time with less code.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts