functype 1.0: Scala-Inspired Functional Programming for TypeScript
After years of iteration, functype reaches a stable 1.0—bringing Option, Either, Try, and immutable collections to TypeScript as a full family of packages.
I’ve spent a lot of my career in Scala, and every time I came back to TypeScript I missed the same things: real Option and Either types, a Try that captures failure as a value, and immutable collections that compose instead of surprise you.
functype is my long-running answer to that itch—a functional programming library for TypeScript modeled on the patterns I relied on in Scala. It’s been on npm since 2023, and it has now reached a stable 1.0.
The core package gives you Option, Either, Try, List, Set, Map, IO, Task, and pattern matching via Match and Cond—the building blocks for type-safe, composition-first code without reaching for a heavyweight framework.
Hitting 1.0 is also when functype grew from a single library into a small family of packages in one monorepo:
- functype — the core FP library
- functype-os — OS utilities (env vars, paths, file ops, platform detection)
- functype-log — IO-native logging wrapping LogLayer with Tag/Layer dependency injection
- functype-react — React bindings (in progress)
- functype-mcp-server — an MCP server for functype documentation lookup and code validation
Docs live at functype.org. It’s MIT licensed, and contributions are welcome.