fp-ts provides developers with popular patterns and reliable abstractions from typed functional languages in TypeScript. The goal of fp-ts is to empower developers to write pure FP apps and libraries built atop higher order abstractions. It includes the most popular data types, type classes, and abstractions from languages like Haskell, PureScript, and Scala. Functional programming is all about pure functions and how to compose them into bigger structures. fp-ts provides a few general functions to support you with composition, constant functions, and more. Data types are the practical part of fp-ts: you can instantiate them with your data to gain properties and functionality that are useful for solving a specific need. Because data types all share common interfaces (through type classes), once you learn how to use one data type, you can apply the same concepts to the others.
Features
- Interoperability with non functional code
- Implementation of Higher Kinded Types, which TypeScript doesn't support natively
- Make sure to always have a single version of fp-ts installed in your project
- This library is conceived, tested and is supposed to be consumed by TypeScript
- Includes the most popular data types, type classes and abstractions
- Write pure FP apps and libraries built atop higher order abstractions