{"id":18876,"library":"type-plus","title":"type-plus","description":"Type utility library providing over 100 advanced TypeScript types for type-level programming. Current stable version is 7.6.2, released on npm with a moderate release cadence. It offers a wide range of type utilities such as numeric operations, object manipulation, array utilities, logical types, and assertion helpers. Key differentiators include a comprehensive set of type-level functions, support for advanced types like `$Equal`, `$Exact`, `Distributive`, and `AdjustExactOptionalProps`, along with built-in support for ESM and CJS. The library is actively maintained with a beta for v8.0.0 introducing breaking changes like renaming of types and ESM-only mode.","status":"active","version":"7.6.2","language":"javascript","source_language":"en","source_url":"https://github.com/unional/type-plus","tags":["javascript","assert","test","testing","type-check","type","types","typescript","typings"],"install":[{"cmd":"npm install type-plus","lang":"bash","label":"npm"},{"cmd":"yarn add type-plus","lang":"bash","label":"yarn"},{"cmd":"pnpm add type-plus","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package supports ESM and CJS; top-level import works for both.","wrong":"import { IsAny } from 'type-plus/esm'","symbol":"IsAny","correct":"import { IsAny } from 'type-plus'"},{"note":"Namespace import to avoid name conflicts.","symbol":"type-plus","correct":"import * as tp from 'type-plus'"},{"note":"In v7.x, use `Equal`; v8.0.0 renames to `$Equal`.","wrong":"import { $Equal } from 'type-plus'","symbol":"Equal","correct":"import { Equal } from 'type-plus'"}],"quickstart":{"code":"import { IsAny, IsNever, IsLiteral, IsUnion, Exact, A } from 'type-plus'\n\n// Check types at the type level\ntype CheckAny = IsAny<any> // true\ntype CheckNever = IsNever<never> // true\ntype CheckLiteral = IsLiteral<'hello'> // true\ntype CheckUnion = IsUnion<string | number> // true\n\n// Exact type comparison\ntype ExactCheck = Exact<{ a: 1 }, { a: 1 }> // true\ntype ExactMismatch = Exact<{ a: 1 }, { a: 2 }> // false\n\n// Array utilities\ntype Reversed = A.Reverse<[1, 2, 3]> // [3, 2, 1]","lang":"typescript","description":"Demonstrates basic type-level type guards and array reversal using type-plus in TypeScript."},"warnings":[{"fix":"Upgrade migration: replace old names with new ones (see changelog).","message":"v8.0.0 renames many types: e.g., `Equal` to `$Equal`, `case*` to `$*`, `Exact` options restructured.","severity":"breaking","affected_versions":"^8.0.0"},{"fix":"Remove usage or use alternative types recommended in documentation.","message":"`NoInfer` and `Failed` types are deprecated in v8.0.0-beta.","severity":"deprecated","affected_versions":"^8.0.0"},{"fix":"Update to version 8.0.0-beta.6 or later.","message":"Incorrect usage of `typesVersions` in package.json caused resolution issues in v8.0.0-beta.5.","severity":"gotcha","affected_versions":"8.0.0-beta.5"},{"fix":"Ensure TypeScript version is >=5.4.","message":"TypeScript 5.4+ required from v8.0.0-beta.2 onward; earlier versions may fail to load types.","severity":"gotcha","affected_versions":">=8.0.0-beta.2"},{"fix":"Upgrade to v7.6.2 or later for fix.","message":"Excessive stack depth errors for some types like `Zeros` in earlier versions.","severity":"gotcha","affected_versions":"<7.6.2"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Upgrade to type-plus@7.6.2+ or avoid using problematic types with deeply nested generics.","cause":"Complex recursive types like `Zeros` cause TypeScript to exceed stack depth.","error":"Excessive stack depth comparing types"},{"fix":"Install package: npm install type-plus@latest. Ensure TypeScript >=5.4 for v8.0.0+.","cause":"Missing or incorrect TypeScript version (<5.4) or package not installed.","error":"Cannot find module 'type-plus' or its corresponding type declarations"},{"fix":"Use proper ES import: `import { IsAny } from 'type-plus'`.","cause":"Incorrect import style: using `require` or wrong path.","error":"Property 'IsAny' does not exist on type 'typeof import(\"type-plus\")'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}