OSS TanbouSign in with GitHub

reuse 200+ type utilities for advanced Object, Union, Function, and other type computations

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
7,150
Primary language
TypeScript
License
Apache-2.0
Repository last updated
Jun 2, 2025
On this page

Overview

ts-toolbelt is a TypeScript utility library with more than 200 mapped, conditional, and recursive type helpers. Its Object, List, Union, Function, and other categories provide reusable building blocks for merges, optional fields, paths, and other advanced type computations.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Choose utilities by Object, List, Union, Function, and other categories

The README advertises more than 200 utilities organized around TypeScript concepts such as Object, List, Union, Function, String, and Number, making advanced operations discoverable by category.

Sources: [2]

Compose Merge, Optional, path, and other advanced type operations

Utilities such as Object Merge and Optional, path-oriented helpers, and Union or Function utilities reduce the need to rebuild complex mapped and conditional types in each project.

Sources: [2]

Choose explicit, compact, or portable import styles

The README documents explicit names such as Object, compact aliases such as O, and a default portable import, letting projects match their existing type-import style.

Sources: [2]

Best fit

Fits TypeScript frontends and libraries with repeated complex generic types

It is useful when nested object transformations, union manipulation, or function-signature types recur across modules and the type-level implementation should be centralized.

Sources: [2]

Before adoption

The documented prerequisite still targets TypeScript ^4.1.0

The README lists TypeScript ^4.1.0 as a prerequisite and strongly recommends strictNullChecks: true. Projects on newer compilers should run their own typecheck against the target TypeScript version before broad adoption.

Sources: [2]

Check package 9.6.0 against the compiler version used by the project

Repository package metadata reports version 9.6.0, while the GitHub repository was last pushed in June 2025. Validate the specific utilities you need with the project's compiler before making them a widely shared dependency.

Sources: [3][1]

Official sources

  1. [1]millsp/ts-toolbelt repository metadata(2026-10-05)
  2. [2]ts-toolbelt README at reviewed commit(2026-10-05)
  3. [3]ts-toolbelt package metadata at reviewed commit(2026-10-05)
  4. [4]ts-toolbelt Apache-2.0 license(2026-10-05)
Supplemental curator note

The README still documents TypeScript ^4.1.0 as its prerequisite, and the repository was last pushed in June 2025. On newer compilers, type-check the utilities you need against the target TypeScript version before making this a shared dependency.

Try it in 3 steps

  1. 1

    Install ts-toolbelt 9.6.0 with a TypeScript version in the documented range

    Create an isolated project with ts-toolbelt 9.6.0 and a compiler inside the README's TypeScript ^4.1.0 prerequisite.

    demo=$(mktemp -d "${TMPDIR:-/tmp}/ts-toolbelt.XXXXXX") && cd "$demo" && npm init -y >/dev/null && npm install --save-exact ts-toolbelt@9.6.0 && npm install --save-exact --save-dev typescript@4.9.5
  2. 2

    Enable strict checking and use Object.Merge

    Enable strictNullChecks as strongly recommended by the README and exercise the representative Object.Merge utility.

    printf "%s\n" '{"compilerOptions":{"strict":true,"strictNullChecks":true,"noEmit":true,"lib":["ES2015"]}}' > tsconfig.json && printf "%s\n" "import {O} from 'ts-toolbelt';" "type User = O.Merge<{name: string}, {age?: number}>;" "const user: User = {name: 'Ada'};" "void user;" > index.ts
  3. 3

    Type-check the project

    Run the compiler in the documented range and confirm that ts-toolbelt's type utilities resolve correctly.

    npx tsc
Check the official README

Growth

Growth trends · Last 30 days

7,150 Stars

Trend data is still being collected.

Development activity

Last 90 days · weekly

Commits (last 30 days)
0
Open PRs
17

Development activity is still being collected.

Built with

Categories and tags

Categories

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • typescript
  • types
  • typescript-library
  • type-checking
  • dynamic-types
  • type-utilities
  • type-safety
  • utility
  • safety
Stars
7,150
Forks
152
Watchers
29
Open issues
66
Contributors
14
Owner type
User
Primary language
TypeScript
License
Apache-2.0
Repository last updated
Jun 2, 2025
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?