ts-match

Official

Simplify TypeScript pattern matching with robust inference.

AuthorOpenWaggle
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill helps TypeScript developers perform pattern matching, exhaustive union handling, and runtime validation efficiently, reducing boilerplate and errors.

Core Features & Use Cases

  • Pattern Matching: Provides APIs like match, match.promise, and matchBy to handle complex conditional logic based on object structure, discriminated unions, and paths.
  • Type Safety & Exhaustiveness: Ensures comprehensive coverage with exhaustive() checks, preventing unhandled cases in TypeScript projects.
  • Runtime Validation: Offers guards like isMatching and assertMatching to validate data objects at runtime, throwing detailed errors when mismatched.
  • Use Case: Developers can parse API responses, configuration objects, or state machines with concise, type-safe code, and catch errors early during development.

Quick Start

Use the ts-match library to handle pattern matching for API response parsing or discriminated union handling in TypeScript.

Dependency Matrix

Required Modules

@diegogbrisa/ts-match

Components

scripts

💻 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: ts-match
Download link: https://github.com/OpenWaggle/OpenWaggle/archive/main.zip#ts-match

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.