{"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,"search_vec":"'100':9 '7.6.2':22 'activ':86 'adjustexactoptionalprop':72 'advanc':10,65 'along':73 'array':45 'assert':50,106 'beta':90 'break':94 'built':76 'built-in':75 'cadenc':30 'chang':95 'check':111 'cjs':82 'comprehens':56 'current':18 'differenti':53 'distribut':70 'equal':68 'esm':80,102 'esm-on':101 'exact':69 'function':62 'helper':51 'includ':54 'introduc':93 'javascript':105 'key':52 'level':16,61 'librari':6,84 'like':67,96 'logic':47 'maintain':87 'manipul':44 'mode':104 'moder':28 'npm':25 'numer':41 'object':43 'offer':32 'oper':42 'plus':3 'program':17 'provid':7 'rang':35 'releas':23,29 'renam':97 'set':57 'stabl':19 'support':63,78 'test':107,108 'type':2,4,12,15,37,48,60,66,99,110,112,113,115 'type-check':109 'type-level':14,59 'type-plus':1 'typescript':11,114 'util':5,38,46 'v8.0.0':92 'version':20 'wide':34","created_at":"2026-04-25T07:40:36.036497+00:00","updated_at":"2026-04-25T07:40:36.036497+00:00","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,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/unional/type-plus","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/type-plus","openapi_spec":null,"status_page":null,"smithery":null,"categories":["type-stubs"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}