# gvergnaud/ts\-pattern

> 🎨 The exhaustive Pattern Matching library for TypeScript, with smart type inference\.

Canonical: https://starboard.codevetter.com/explore/gvergnaud/ts-pattern

[Back to Discover](https://starboard.codevetter.com/discover)

![gvergnaud](https://avatars.githubusercontent.com/u/9265418?v=4&s=40)

gvergnaud

# ts\-pattern

[View on GitHub
](https://github.com/gvergnaud/ts-pattern)

🎨 The exhaustive Pattern Matching library for TypeScript, with smart type inference\.

branching
conditions
exhaustive
inference
javascript
matching
pattern
pattern\-matching
ts
type\-inference
typescript


15k stars

TypeScript

Updated 1d ago

Created May 24, 2020

## Star history

\+206 stars
1\.4% growth


## Detected tools

[Jest](https://starboard.codevetter.com/tools/jest)
[Prettier](https://starboard.codevetter.com/tools/prettier)
[React](https://starboard.codevetter.com/tools/react)
[npm](https://starboard.codevetter.com/tools/npm)


Tool detection is evidence\-based, not a full runtime audit\. Package manifests, lockfiles, and SBOMs are high\-confidence; README, topics, and AI metadata are lower\-confidence signals\. Repository language is metadata, not counted as a tool\. Accuracy varies by ecosystem, especially for C/C\+\+ and custom monorepos\.

- Jest  · 98% confidence · Sources: github\-sbom, package\.json · Detected Jul 21, 2026

- Prettier  · 98% confidence · Sources: github\-sbom, package\.json · Detected Jul 21, 2026

- React  · 98% confidence · Sources: examples/gif\-fetcher/package\.json, github\-sbom · Detected Jul 21, 2026

- npm  · 98% confidence · Sources: benchmarks/package\-lock\.json, package\-lock\.json · Detected Jul 21, 2026

## Similar projects

[![dsherret](https://avatars.githubusercontent.com/u/1609021?v=4&s=24)

dsherret/ ts\-morph

TypeScript Compiler API wrapper for static analysis and programmatic code changes\.

TypeScript 6\.2k 71%](https://starboard.codevetter.com/explore/dsherret/ts-morph)[![gcanti](https://avatars.githubusercontent.com/u/878912?v=4&s=24)

gcanti/ io\-ts

Runtime type system for IO decoding/encoding

TypeScript 6\.8k 70%](https://starboard.codevetter.com/explore/gcanti/io-ts)[![gibbok](https://avatars.githubusercontent.com/u/17195702?v=4&s=24)

gibbok/ typescript\-book

The Concise TypeScript Book: A Concise Guide to Effective Development in TypeScript\. Free and Open Source\.

TypeScript 10k 69%](https://starboard.codevetter.com/explore/gibbok/typescript-book)[![colinhacks](https://avatars.githubusercontent.com/u/3084745?v=4&s=24)

colinhacks/ zod

TypeScript\-first schema validation with static type inference

TypeScript 44k 68%](https://starboard.codevetter.com/explore/colinhacks/zod)[![gcanti](https://avatars.githubusercontent.com/u/878912?v=4&s=24)

gcanti/ fp\-ts

Functional programming in TypeScript

TypeScript 12k 73%](https://starboard.codevetter.com/explore/gcanti/fp-ts)[![palantir](https://avatars.githubusercontent.com/u/303157?v=4&s=24)

palantir/ tslint

:vertical\_traffic\_light: An extensible linter for the TypeScript language

TypeScript 5\.9k 71%](https://starboard.codevetter.com/explore/palantir/tslint)[![TypeStrong](https://avatars.githubusercontent.com/u/6759814?v=4&s=24)

TypeStrong/ ts\-node

TypeScript execution and REPL for node\.js

TypeScript 13k 68%](https://starboard.codevetter.com/explore/TypeStrong/ts-node)[![open\-circle](https://avatars.githubusercontent.com/u/162486767?v=4&s=24)

open\-circle/ valibot

The modular and type safe schema library for validating structural data 🤖

TypeScript 9\.1k 66%](https://starboard.codevetter.com/explore/open-circle/valibot)
