TypeScript: why you shouldn't throw errors to control the program flow

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

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.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
  • TypeScript

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

  • TypeScript's type system has no way to encode the functions that can be thrown from a piece of code into a meaningful type representation, at least as of now. This means that the compiler cannot indicate that the programmer should prepare for an error being thrown and handle it accordingly.

  • fp-ts

    Functional programming in TypeScript

  • Those familiar with more functional languages might be screaming about monads at their screens now. Indeed, if we want to go a step further than using discriminated unions, we can apply Either monads. Those come with a whole lot of useful tooling with them, like the possibility of monadic pattern matching and chaining operations. We have good experiences of using fp-ts in my team at Swappie, and even thought the initial learning curve can be steep, the benefits are useful. You can read more about monads in various blog posts all over the web, this one being a good example of Either specifically.

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

  • Question about error handling in Typescript

    3 projects | /r/typescript | 20 Aug 2022
  • How to use advanced Typescript to define a `pipe` function

    2 projects | dev.to | 11 Jun 2022
  • Why doesn't typescript have a throws type to annotate functions that can throw an error?

    3 projects | /r/typescript | 5 May 2022
  • Help - Higher kinded types

    3 projects | /r/typescript | 24 Aug 2021
  • Is it possible to give utility types as arguments to other utlities?

    2 projects | /r/typescript | 7 Apr 2021