{
 "kind": "tool",
 "slug": "type-fest",
 "path": "tools/type-fest/",
 "name": "type-fest",
 "maker": null,
 "density": "full",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "Languages, types and runtimes",
   "tools/languages-types/"
  ]
 ],
 "lead": "Ready-made TypeScript types for common data shapes.",
 "chips": [
  {
   "label": "Languages, types and runtimes",
   "path": "tools/languages-types/"
  },
  {
   "label": "NPM"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "npm install type-fest"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/sindresorhus/type-fest"
  },
  {
   "label": "Website",
   "href": "https://github.com/sindresorhus/type-fest#readme"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "(MIT OR CC0-1.0)",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": "\"license\": \"(MIT OR CC0-1.0)\",",
   "note": "Use it under MIT or CC0-1.0, your choice; CC0 asks for nothing.",
   "src": "https://github.com/sindresorhus/type-fest/blob/v5.10.0/package.json"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Nov 19, 2026",
   "note": "Latest GitHub release Nov 19, 2026. ",
   "src": "https://github.com/sindresorhus/type-fest"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "33 projects",
   "status": "info",
   "sub": "#11 of 70 in its category",
   "note": "Dependency in 33 public GitHub projects set up for AI coding agents that we scanned (0.5%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Install only",
   "status": "info",
   "sub": null,
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": null
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily; card checked Nov 10, 2026.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What type-fest does",
   "parts": [
    {
     "t": "prose",
     "text": "type-fest is a free collection of ready-made TypeScript types, short rules that describe what your data must look like. Your code editor then catches mistakes such as sending a password field out or forgetting a required contact field, before the app runs. It only helps while code is written and adds nothing to what visitors download."
    },
    {
     "t": "h3",
     "text": "What people build with it"
    },
    {
     "t": "uses",
     "items": [
      {
       "title": "Send user data without the password",
       "text": "Describe the user record your server may send out as \"the user, minus the password\", so the editor flags any code that leaks it.",
       "idea": false
      },
      {
       "title": "New records before the database sets the id",
       "text": "A sign-up form builds a user without an id, and the type still demands every other field.",
       "idea": false
      },
      {
       "title": "Save only the settings that changed",
       "text": "A settings page sends just the switches the person touched, even deep inside nested groups, and the type still checks their names.",
       "idea": false
      },
      {
       "title": "Ask for an email or a phone",
       "text": "A contact form must get at least one way to reach the person; an empty contact is refused while you write the code.",
       "idea": false
      },
      {
       "title": "Lock shared settings against edits",
       "text": "Mark a loaded configuration as read-only all the way down, so no part of the app can change it by mistake.",
       "idea": false
      },
      {
       "title": "Plan names with suggestions",
       "text": "Your editor suggests the known plan names, like free and pro, but still accepts a new name a partner sends.",
       "idea": false
      }
     ]
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "type-fest popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "73",
       "of": "/ 100",
       "l": "Gid Score, #279 overall"
      },
      {
       "n": "549M",
       "l": "downloads a week, npm"
      },
      {
       "n": "17.6K",
       "l": "GitHub stars"
      },
      {
       "n": "33",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How type-fest is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "type-fest is a dependency in 33 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (0.7% of the 4,867 JavaScript/TypeScript ones), #11 of 70 in languages, types and runtimes.",
      "Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 99; those are left out of every share on this page.",
      "Projects that use it most often also use Vitest (69.7%), tsx (57.6%), semver (JavaScript) (48.5%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "27 projects, 0.8%",
       "v": "Claude Code",
       "path": "agents/claude-code/"
      },
      {
       "l": "16 projects, 0.5%",
       "v": "GitHub Copilot",
       "path": "agents/github-copilot/"
      },
      {
       "l": "14 projects, 0.6%",
       "v": "Cursor",
       "path": "agents/cursor/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 69.7% of its projects",
       "v": "Vitest",
       "path": "tools/vitest/"
      },
      {
       "l": "In 57.6% of its projects",
       "v": "tsx",
       "path": "tools/tsx/"
      },
      {
       "l": "In 48.5% of its projects",
       "v": "semver (JavaScript)",
       "path": "tools/semver-npm/"
      },
      {
       "l": "In 100.0% of its projects",
       "v": "TypeScript",
       "path": "tools/typescript/"
      },
      {
       "l": "In 66.7% of its projects",
       "v": "Zod",
       "path": "tools/zod/"
      },
      {
       "l": "In 36.4% of its projects",
       "v": "uuid",
       "path": "tools/uuid/"
      },
      {
       "l": "In 36.4% of its projects",
       "v": "esbuild",
       "path": "tools/esbuild/"
      },
      {
       "l": "In 36.4% of its projects",
       "v": "Fuse.js",
       "path": "tools/fuse-js/"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "usage",
   "h2": "More about type-fest",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Funding",
       "path": "tools/funding/",
       "items": [
        "GitHub Sponsors: https://github.com/sindresorhus",
        "GitHub Sponsors: https://github.com/som-sm",
        "GitHub Sponsors: https://github.com/Emiyaaaaa",
        "GitHub Sponsors: https://github.com/voxpelli",
        "186 GitHub sponsors"
       ]
      },
      {
       "title": "More in Languages, types and runtimes",
       "path": "tools/languages-types/",
       "items": [
        {
         "text": "TypeScript",
         "path": "tools/typescript/"
        },
        {
         "text": "tsx",
         "path": "tools/tsx/"
        },
        {
         "text": "ts-node",
         "path": "tools/ts-node/"
        },
        {
         "text": "jiti",
         "path": "tools/jiti/"
        },
        {
         "text": "vue-tsc",
         "path": "tools/vue-tsc/"
        },
        {
         "text": "Cloudflare Workers Types",
         "path": "tools/cloudflare-workers-types/"
        },
        {
         "text": "mypy",
         "path": "tools/mypy/"
        },
        {
         "text": "tsconfig-paths",
         "path": "tools/tsconfig-paths/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "type-fest",
       "me": true,
       "facts": [
        "(MIT OR CC0-1.0)",
        "Gid 73",
        "549M/wk"
       ]
      },
      {
       "name": "TypeScript",
       "why": "Pick TypeScript's own built-in helpers (Partial, Omit, Pick, Readonly) when you only need shallow, one-level changes.",
       "path": "tools/typescript/",
       "facts": []
      },
      {
       "name": "Zod",
       "why": "Pick Zod when the data also has to be checked while the app runs, for example form input or answers from a server.",
       "path": "tools/zod/",
       "facts": []
      }
     ],
     "more": "Compare type-fest with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "prompt",
     "text": "Use the npm package type-fest (pin type-fest@5.10.0, TypeScript 5.9+, ESM, strict true) with import type only, and build our types with Except, SetOptional, PartialDeep and RequireAtLeastOne instead of hand-written copies."
    },
    {
     "t": "steps",
     "items": [
      {
       "text": "Add type-fest to a TypeScript project that uses ES modules and strict mode.",
       "code": "npm install type-fest",
       "src": "https://github.com/sindresorhus/type-fest/blob/v5.10.0/readme.md"
      },
      {
       "text": "Import the types you need with import type and build your own types from them.",
       "code": "import type {Except} from 'type-fest';\n\ntype Foo = {\n\tunicorn: string;\n\trainbow: boolean;\n};\n\ntype FooWithoutRainbow = Except<Foo, 'rainbow'>;\n//=> {unicorn: string}\n",
       "src": "https://github.com/sindresorhus/type-fest/blob/v5.10.0/readme.md"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Mistakes to avoid"
    },
    {
     "t": "mistakes",
     "items": [
      {
       "dont": "import {Except} from 'type-fest'",
       "fix": "import type {Except} from 'type-fest'",
       "why": "The package ships only types; in our run with verbatimModuleSyntax the plain import gave TS1484 for every imported name."
      },
      {
       "dont": "Installing type-fest 5 in a project on TypeScript below 5.9 or on CommonJS",
       "fix": "Upgrade to TypeScript 5.9+ with ES modules, or stay on type-fest 4.41.0, the last 4.x release",
       "why": "5.0.0 made the package ESM-only and raised the TypeScript minimum."
      },
      {
       "dont": "Using type-fest with \"strict\": false in tsconfig",
       "fix": "Turn on \"strict\": true",
       "why": "The types are only supported in strict mode."
      },
      {
       "dont": "StringKeyOf<T> or Opaque<T, Tag> from older guides",
       "fix": "KeyAsString<T> and Tagged<T, Tag>",
       "why": "StringKeyOf was renamed in 5.0.0, and the README points Opaque to Tagged."
      },
      {
       "dont": "Copying requirements from the main-branch README (TypeScript >=6, exactOptionalPropertyTypes) for 5.10.0",
       "fix": "Read the README of the version you install (v5.10.0 needs TypeScript 5.9+ and strict)",
       "why": "The main-branch README describes the unreleased development version."
      }
     ]
    }
   ]
  },
  {
   "id": "faq",
   "nav": "Questions",
   "h2": "Questions",
   "parts": [
    {
     "t": "faq",
     "items": [
      {
       "q": "Does it make my app bigger?",
       "a": "No. The package has only type files, so nothing is bundled into the app.",
       "evidence": {
        "url": "https://github.com/sindresorhus/type-fest/blob/v5.10.0/package.json",
        "quote": "\"types\": \"./index.d.ts\""
       }
      },
      {
       "q": "Can I copy one type instead of installing the whole package?",
       "a": "Yes, the README allows copying the types you need, with no credit required.",
       "evidence": {
        "url": "https://github.com/sindresorhus/type-fest/blob/v5.10.0/readme.md",
        "quote": "Either add this package as a dependency or copy-paste the needed types. No credit required."
       }
      },
      {
       "q": "Does it check data while the app runs?",
       "a": "No. TypeScript types only exist while you write and build code; for checks at run time use a validator such as Zod.",
       "evidence": {
        "url": "https://github.com/sindresorhus/type-fest/blob/v5.10.0/readme.md",
        "quote": "A collection of essential TypeScript types"
       }
      },
      {
       "q": "I know a type as Opaque, Branded or PartialBy. Is it there?",
       "a": "Yes, under another name. The README lists Tagged for Opaque and Branded, and SetOptional for PartialBy.",
       "evidence": {
        "url": "https://github.com/sindresorhus/type-fest/blob/v5.10.0/readme.md",
        "quote": "If you know one of our types by a different name, add it here for discovery."
       }
      }
     ]
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "npm type-fest"
  ],
  [
   "Category",
   "Languages, types and runtimes"
  ],
  [
   "License",
   "(MIT OR CC0-1.0)"
  ],
  [
   "Gid Score",
   "72.9"
  ],
  [
   "Rank in category",
   "#11 of 70"
  ],
  [
   "GitHub",
   "sindresorhus/type-fest"
  ],
  [
   "Last change",
   "Nov 19, 2026"
  ]
 ],
 "good": [
  "It is for TypeScript projects only. Version 5 needs TypeScript 5.9 or newer, ES modules and strict mode turned on.",
  "It contains only type files, no code that runs. Nothing from it reaches your visitors' browsers.",
  "The README on the main branch describes the next, unreleased version. For the installed 5.10.0, read the docs at its own release."
 ],
 "checked_line": "Read by AgentGid from 9 official pages, card checked Nov 10, 2026; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/sindresorhus.png"
}