Our great sponsors
-
Another situation where the idea of narrowing a type arises when we receive JSON at runtime and wish to convert the data inside the JSON into our own stricter types within our domain. Check in next time for an article around the same concepts using io-ts.
-
A Bounded is used to name the upper and lower limits within the a type for your domain. So for example, in this example, I am going to use a Bounded from the fp-ts library to represent the age of a person within the bounds of 18 & 100.
-
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.