RSS feed iconGitHub logo

Articles about fp-ts

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.

Type-safe nullability without strictNullChecks

2023-05-105 minutes readfp-ts, TypeScript

Lack of strictNullChecks makes it hard to express nullability of values. fp-ts's Option comes to the type-safe rescue.

Read more

fp-ts with React hooks

2023-05-106 minutes readfp-ts, React

Using fp-ts containers in React hook dependency arrays is tricky since their references are not stable.

Read more

Collecting multiple errors in fp-ts

2022-07-0214 minutes readfp-ts, TypeScript

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.

Read more