ADTs in Typescript

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

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
  • TypeScript

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

  • variant

    Variant types in TypeScript (by paarthenon)

  • When working in a TS codebase I'll lean on this variant library, which works pretty well as far as simple sum types go (v3 is great but not stable yet).

  • 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.

    SurveyJS logo
  • rescript-compiler

    The compiler for ReScript.

  • I think variants and pattern matching make code so much better, and now I do all my personal hobby projects in rescript now.

  • ts-pattern

    🎨 The exhaustive Pattern Matching library for TypeScript, with smart type inference.

  • The library ts-pattern does an even better job when matching multiple cases and including if clauses, but until they merge their Variant Types it's just a little too verbose for me

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