Analysis updated 2026-06-24
Use MergeDeep to type-check the result of deeply combining two config objects without losing type information.
Use RequireAtLeastOne to enforce that a function argument must supply at least one of a set of optional properties.
Use PartialDeep to type a recursive partial update payload where any nested field may be omitted.
Copy-paste individual type definitions directly into a project without installing the package at all.
| sindresorhus/type-fest | foambubble/foam | clauderic/dnd-kit | |
|---|---|---|---|
| Stars | 17,132 | 17,117 | 17,109 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | easy | easy | easy |
| Complexity | 2/5 | 2/5 | 3/5 |
| Audience | developer | general | developer |
Figures from each repo's GitHub metadata at analysis time.
type-fest is a TypeScript utility library that provides a large collection of reusable type definitions. TypeScript ships with a handful of built-in helper types like Partial, Pick, and Omit, but many other useful type shapes that developers reinvent over and over are not in the standard library. type-fest fills that gap by packaging dozens of well-tested type utilities into a single npm package. You install it with npm install type-fest and import the types you need, for example: import type Except from type-fest. There are no runtime files, the package adds nothing to your shipped JavaScript bundle because TypeScript types disappear at compile time. The author also notes you can copy-paste the type definitions directly without using the package, with no credit required. The library covers a wide surface area. Basic types include Primitive, Class, Constructor, AbstractClass, TypedArray, ObservableLike, and character matchers for letters and digits. Object utilities include EmptyObject, NonEmptyObject, UnknownRecord, Except for omitting keys, Merge and MergeDeep for combining types, MergeExclusive, RequireAtLeastOne, RequireExactlyOne, PickDeep, OmitDeep, PartialDeep, RequiredDeep, Writable, and many more. The README lists further categories beyond what is shown. You would reach for type-fest when you find yourself writing the same complex generic type by hand across multiple TypeScript projects, or when your code needs to express something subtle like an object that must have at least one of a set of keys. Requirements are TypeScript 5.9 or newer, ESM, and strict mode enabled in tsconfig. The full README is longer than what was provided.
type-fest is a TypeScript library that adds dozens of missing utility types, like Merge, PartialDeep, and RequireAtLeastOne, that disappear at compile time and add nothing to your JavaScript bundle.
Mainly TypeScript. The stack also includes TypeScript.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.