fp-ts Option and Either

Community

Safely handle Option and Either with fp-ts.

Authorwhatiskadudoing
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill provides safe handling of nullable values and errors in TypeScript by leveraging fp-ts Option and Either, reducing runtime issues and improving type safety.

Core Features & Use Cases

  • Option-based handling for nullable values, reducing undefined checks.
  • Either-based error propagation with typed failures, enabling robust validation flows.
  • Seamless composition with pipe and functional utilities to build readable pipelines.
  • Use case: convert a nullable user id to an Option and then validate it with typed errors.

Quick Start

Install fp-ts and import the modules. Convert a nullable value to an Option using fromNullable and extract with getOrElse. Create and transform Either values with right/left and map/chain as needed.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: fp-ts Option and Either
Download link: https://github.com/whatiskadudoing/fp-ts-skills/archive/main.zip#fp-ts-option-and-either

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.