Skip to content
Agents tracked: 492 Releases (7d): 545 Agent status: 1 with issuesSince last limit reset: Claude 9d · Codex 7d For AI agents: Markdown Updated Nov 20, 2026

TS-Pattern

Exhaustive pattern matching for TypeScript.

UtilitiesNPM

GitHubWebsite

1. License

License from npm.

github.com/gvergnaud/ts-pattern

From the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error

What TS-Pattern does

Exhaustive pattern matching for TypeScript.

TS-Pattern popularity

60 / 100
Gid Score, #951 overall
9.5M
downloads a week, npm
15.2K
GitHub stars
7
agent projects use it
TS-Pattern: downloads per weeknpm, ts-pattern 9,511,833
TS-Pattern: GitHub starsgvergnaud/ts-pattern 15,218

Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated

How TS-Pattern is used

  • TS-Pattern joined the catalog on its public numbers (9,511,833 downloads a week on npm and 15,218 GitHub stars), not on our project count: it is a dependency in 19 public GitHub projects of our scan, 7 of them set up for AI coding agents.
  • Projects that use it most often also use TypeScript (100.0%), React (73.7%), Biome (36.8%).

Often used with

In 100.0% of its projects
In 73.7% of its projects
In 36.8% of its projects
In 52.6% of its projects
In 68.4% of its projects
In 47.4% of its projects
In 52.6% of its projects
In 26.3% of its projects

More about TS-Pattern

Funding
  • GitHub Sponsors: https://github.com/gvergnaud
  • 1 GitHub sponsors

See all

More in Utilities

Alternatives

TS-Pattern This page

MITGid 609.5M/wk

Compare TS-Pattern with another tool

Get started

Install it.

npm install ts-pattern

No step-by-step start for TS-Pattern yet: we have not written its hand-checked card.