fp-ts: typed functional programming for TypeScript, and what its merger means
Functional programming in TypeScript
At a glance
- What is it?
- The library for typed functional programming in TypeScript is joining into the Effect-TS ecosystem, which changes the answer to whether you should start a new project on it.
- Who is it for?
- fp-ts did the hard part early. Higher kinded types on top of a language that has no native support for them, plus a set of type classes that behave the way they do in Haskell or PureScript, is why the package has 11551 stars and a 190 item issue tracker.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Activity is slowing. The repository last received commits 7 months ago.
- What is it written in?
- Mainly TypeScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 22, 2026, and from our analysis. They are not legal advice.
Star history
- gcanti/fp-ts11,559 ★ · +11
| Repository | 2026-10-07 | 2026-11-22 |
|---|---|---|
| gcanti/fp-ts | 11.5k | 11.6k |
11 Stars in the last 46 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
What fp-ts actually is, in the project's own words
The repository describes the package as a library for typed functional programming in TypeScript. The stated goal is to let developers use patterns and abstractions that are available in most functional languages, and to that end it ships the popular data types and type classes: Option, Either, IO, Task, Functor, Applicative and Monad.
That list is the whole pitch. The idea is that you write pure code and compose it through higher order abstractions rather than threading error handling through return values and try blocks.
The README is explicit that the inspirations are Haskell, PureScript and Scala. `Option` for a value that might be absent, `Either` for a computation that might fail, `IO` for a deferred side effect, `Task` for a deferred asynchronous side effect.
The stated distinctive feature is higher kinded types, which TypeScript does not support natively. That is the hard technical claim in the package and the reason the type-level machinery is as elaborate as it is. It is also what lets a single `map` signature work across all those data types.
Installing it, and the duplicate version trap
Installation is one command:
npm install fp-tsThat is the entire install section. What follows it is more interesting, because it is the first operational warning a new user meets: make sure you always have a single version of fp-ts in your project. Multiple versions are known to cause `tsc` to hang during compilation, and the README suggests checking with `npm ls fp-ts`, making sure there is one version and the rest are marked `deduped`.
A compiler hang is a nasty failure mode, and it is worth understanding why it happens. The README only states that multiple versions are known to cause the hang; it does not explain the mechanism.
The second installation concern is TypeScript version. The README's compatibility table maps fp-ts versions to minimum TypeScript versions: 2.0.x and later need TypeScript 3.5 or newer, 1.15.x and later need 3.1 or newer, and anything at or below 1.14.4 needs 2.8 or newer, with a note that a TypeScript older than 3.0.1 requires polyfilling the `unknown` type. The project states that it is conceived, tested and meant to be consumed with the `strict` flag turned on.
Higher kinded types on a language that lacks them
TypeScript has generics, but it does not let you abstract over the relationship between a type and the type constructor applied to it. A `Functor` constraint in Haskell can talk about `f a` for any `f`. The README says the library implements higher kinded types, which TypeScript does not support natively.
This is the single most important thing to understand about the library before you adopt it. Every design tradeoff downstream follows from it.
The payoff is that a function written once against `Functor` works over every structure the library models. The source only links a code conventions guide and lists release 2.16.0 by version and date.
The merger announcement is the most consequential thing on the README
The most important paragraph in the repository is an announcement at the top of the README, above even the introduction. It states that fp-ts is joining the Effect-TS ecosystem, that Giulio Canti, the author, is being welcomed into the Effect organization, and that Effect-TS can be regarded as the successor to fp-ts v2, effectively a v3.
Under "What This Means for New Users" the README says Effect-TS can be regarded as the successor to fp-ts v2 and embodies what would be fp-ts v3, which changes the usual reason people open this page.
A secondary detail worth noting is that the Effect organization is already visible in the development dependencies. `@effect/dtslint` and `@effect/language-service` appear in `package.json`, which suggests the tooling has been migrating even if the library modules have not.
For people already using fp-ts, the announcement is not a deprecation notice with a removal date. The package remains MIT licensed, installable from npm, and documented, with an API reference for the current 2.x line and a separate one for 1.x. The README does not say what the merger means for the 2.x line beyond calling Effect-TS its successor.
The build and test setup behind the releases
`package.json` describes a build that compiles twice, once per module target, and then runs a build script:
"build": "tsc -p ./tsconfig.build.json && tsc -p ./tsconfig.build-es6.json && ts-node scripts/build",The dual compile is why `package.json` carries both a `main` field pointing at CommonJS output in `./lib/index.js` and a `module` field pointing at ES module output in `./es6/index.js`, with typings in `lib/index.d.ts`. Supporting both module systems in one package is not free, and this is where that cost shows.
The test script is a chain rather than a single runner:
"test": "npm run lint && npm run prettier && npm run dtslint && npm run vitest && npm run docs",So a full check runs ESLint, then Prettier in list-different mode, then dtslint for type-level tests, then Vitest, then regenerates documentation. The type-level test step is not optional decoration. For a library whose main contribution is types, dtslint is where the contribution actually lives.
There is also a `dpdm` script that runs dpdm with a circular dependency check and exit code,. `sideEffects` is set to `false`, so bundlers can tree shake it, and the repository has `perf/` and `examples/` directories; the examples are named fp-ts-to-the-max-I.ts and fp-ts-to-the-max-II.ts.
The GitHub releases listed are 2.16.9 (December 2024), 2.16.5 (March 2024) and 2.16.0 (May 2023), while `package.json` is already at 2.16.11.
What the repository will not teach you, and where to go instead
The documentation section opens with a disclaimer that is unusual and completely honest: teaching functional programming is out of scope for this project, so the documentation assumes you already know what functional programming is. If you do not, this library will not teach you, and the effort of reading the API docs without that background is high.
What you get instead is a reference: generated API docs for the current 2.x line at gcanti.github.io/fp-ts, a separate reference for 1.x in that repository's own `1.x` branch, a learning resources page, and an ecosystem page listing the libraries built on top of this one.
Support goes through a Discord server and the `#fp-ts` channel on FP Slack. Development conventions are published as their own code conventions guide.
The repository tree also tells you what is not in the library. There is no application code, no server, no CLI. It is `src/`, `test/`, `dtslint/`, `docs/`, `perf/`, `examples/` and build configuration, which is what you would expect from a library that is deliberately narrow.
Editorial conclusion
fp-ts did the hard part early. Higher kinded types on top of a language that has no native support for them, plus a set of type classes that behave the way they do in Haskell or PureScript, is why the package has 11551 stars and a 190 item issue tracker. What has changed is the direction of travel. The README now states that the project is merging into the Effect-TS ecosystem and that Effect-TS can be regarded as the successor to fp-ts v2, effectively a v3. For a new build that is the decision to make. For an existing fp-ts codebase the package is still MIT licensed, still on npm at 2.16.11 in `package.json`, and still documented, so nothing forces a rewrite. Keep a single version of fp-ts installed to avoid the `tsc` hang, stay on a TypeScript new enough for your line, and read the merger announcement before planning any long-lived work.
Frequently asked questions
What is fp-ts?
It is a TypeScript library for typed functional programming, providing data types and type classes such as Option, Either, IO, Task, Functor, Applicative and Monad so you can write pure code composed through higher order abstractions. Its distinctive feature is an implementation of higher kinded types, which TypeScript does not support natively.
Can you explain functional programming in TypeScript?
The short version is that you model absence and failure as values rather than as control flow, and compose operations through type classes instead of nesting calls. fp-ts ships the structures for that: Option for optional values, Either for expected failures, IO and Task for deferred effects, and Functor, Applicative and Monad to abstract over how those structures compose. The README is explicit that teaching functional programming is out of scope, so this library assumes you already know the concepts.
What does FP stand for in software engineering?
Functional programming. In the context of this repository it names the fp-ts package, whose npm description is literally Functional programming in TypeScript, and whose stated inspirations are Haskell, PureScript and Scala. The abbreviation is also reused in a community Slack workspace, which is where the project's support channel lives.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/gcanti-fp-ts)Star history chart for your README
[](https://hysenlabs.com/projects/gcanti-fp-ts)Was this useful?