| name | fp-types-ref |
| description | Quick reference for fp-ts types. Use when user asks which type to use, needs Option/Either/Task decision help, or wants fp-ts imports. |
| type | skill |
| created | 2026-02-27T00:00:00.000Z |
| domain | communication-content |
| category | documentation |
| risk | safe |
| source | community |
| tags | ["skill","communication-content","documentation","types","ref"] |
fp-ts Quick Reference
When to Use
- You need help choosing between
Option, Either, Task, TaskEither, or related fp-ts types.
- The task is about imports, decision guidance, or selecting the right abstraction for a TypeScript flow.
- You want a compact reference for common fp-ts type choices and patterns.
Which Type Should I Use?
Is the operation async?
├─ NO: Does it involve errors?
│ ├─ YES → Either<Error, Value>
│ └─ NO: Might value be missing?
│ ├─ YES → Option<Value>
│ └─ NO → Just use the value
└─ YES: Does it involve errors?
├─ YES → TaskEither<Error, Value>
└─ NO: Might value be missing?
├─ YES → TaskOption<Value>
└─ NO → Task<Value>
Common Imports
import { pipe, flow } from 'fp-ts/function'
import * as O from 'fp-ts/Option'
import * as E from 'fp-ts/Either'
import * as TE from 'fp-ts/TaskEither'
import * as T from 'fp-ts/Task'
import * as A from 'fp-ts/Array'
One-Line Patterns