Type-safe nullability without strictNullChecks
Lack of strictNullChecks makes it hard to express nullability of values. fp-ts's Option
comes to the type-safe rescue.
fp-ts is a library for functional programming in TypeScript. It offers many modules that make it easier to write functional code. It is oriented on minimizing side-effects, focusing on strictly-typed error handling, and reducing boilerplate.
Lack of strictNullChecks makes it hard to express nullability of values. fp-ts's Option
comes to the type-safe rescue.
Using fp-ts containers in React hook dependency arrays is tricky since their references are not stable.
The fp-ts library puts errors to the forefront and helps write type-safe code that correctly reports errors. Collecting errors from multiple operations can sometimes lead to boilerplate code. Let's see if there is a way to make that code shorter.