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

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

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • 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.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

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