OSS TanbouSign in with GitHub

reuse DeepPartial, StrictOmit, and other utilities to simplify advanced TypeScript type definitions

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
4,078
Primary language
TypeScript
License
MIT
Repository last updated
Jun 3, 2026
On this page

Overview

ts-essentials is a collection of TypeScript utility types that extends the built-in utility set. DeepPartial, StrictOmit, XOR, Paths, PathValue, Opaque, and related helpers let projects reuse advanced object and union transformations instead of rebuilding them repeatedly.

Features and best fit

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

Key features

Use stricter alternatives to built-in utility types

Types such as StrictOmit, StrictExclude, and StrictExtract add stricter constraints around common transformations, helping surface invalid keys and incompatible type operations earlier.

Sources: [1]

Transform nested structures with DeepPartial and DeepReadonly

DeepPartial, DeepRequired, DeepReadonly, and DeepWritable recursively apply modifiers through nested objects and arrays, which is useful for configuration values and update payloads.

Sources: [1]

Express API constraints with XOR, Opaque, Paths, and PathValue

XOR models mutually exclusive alternatives, Opaque supports distinguishable value types, and Paths with PathValue provides type-safe access to nested paths.

Sources: [1]

Best fit

Fits frontends and libraries that repeat complex type operations

It is useful in TypeScript codebases where API responses, form state, configuration objects, or public library types repeatedly need the same type-level transformations.

Sources: [1]

Before adoption

v10.2.1 requires TypeScript 4.5+ and strictNullChecks

The README and package metadata require TypeScript >=4.5, and the README requires strictNullChecks to be enabled. Existing projects with looser null handling should assess the resulting type errors first.

Sources: [1][2]

Runtime helpers require a regular dependency

Most utilities are type-only, but the package also contains runtime helpers such as assert and UnreachableCaseError. The README warns that projects using those helpers should install ts-essentials in regular dependencies rather than only devDependencies.

Sources: [1]

Official sources

  1. [1]ts-essentials v10.2.1 README(2026-10-05)
  2. [2]ts-essentials v10.2.1 package metadata(2026-10-05)
  3. [3]ts-essentials v10.2.1 release(2026-10-05)
  4. [4]ts-essentials MIT license(2026-10-05)
Supplemental curator note

When using only types, the README installs ts-essentials as a development dependency. If you use runtime helpers such as assert or UnreachableCaseError, follow the README warning and keep it in regular dependencies.

Try it in 3 steps

  1. 1

    Install ts-essentials 10.2.1 with TypeScript

    Follow the README's type-only setup by installing ts-essentials as a development dependency with a pinned TypeScript compiler.

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

    Enable strictNullChecks and use StrictOmit

    Use the required strictNullChecks setting and combine representative utility types in a small example.

    printf "%s\n" '{"compilerOptions":{"strict":true,"strictNullChecks":true,"noEmit":true}}' > tsconfig.json && printf "%s\n" "import type {StrictOmit, DeepReadonly} from 'ts-essentials';" "type User = {id: string; profile: {name: string; active: boolean}};" "type PublicUser = StrictOmit<User, 'id'>;" "const user: DeepReadonly<PublicUser> = {profile: {name: 'Ada', active: true}};" "void user;" > index.ts
  3. 3

    Type-check the project

    Run the compiler without emitting JavaScript and confirm that the ts-essentials declarations resolve correctly.

    npx tsc
Check the official README

Growth

Growth trends · Last 30 days

4,078 Stars

Trend data is still being collected.

Development activity

Last 90 days · weekly

Commits (last 30 days)
0
Open PRs
1

Development activity is still being collected.

Built with

Categories and tags

Categories

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • typescript
  • types
  • essentials
  • type-level-programming
  • toolbox
Stars
4,078
Forks
129
Watchers
10
Open issues
16
Contributors
42
Owner type
Organization
Primary language
TypeScript
License
MIT
Repository last updated
Jun 3, 2026
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?