functional-ts

Community

Master functional domain modeling in TypeScript.

Authoriwasa-kosui
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Domain modeling in server-side TypeScript often becomes brittle when using classes; this Skill provides a functional approach using discriminated unions, pure functions, and Result types to ensure safer, more maintainable domain logic.

Core Features & Use Cases

  • Discriminated unions for state modeling with kind as discriminant.
  • Pure state transitions as deterministic functions.
  • Error handling with Result types and exhaustive error typing.
  • Validation boundary integration and PII protection with Sensitive type.
  • Use cases include modeling workflows like taxi dispatch, order processing, and API boundaries.

Quick Start

Create a simple domain with Waiting and EnRoute states and demonstrate a pure transition from Waiting to EnRoute when a driver is assigned.

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: functional-ts
Download link: https://github.com/iwasa-kosui/functional-ts-principles/archive/main.zip#functional-ts

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 471,000+ vetted skills library on demand.