expect-type provides `expectTypeOf` compile-time tests for TypeScript types. It lets you assert the shape and constraints of values and generic type parameters (for example, equality, subtype/extends relationships, and checks for any or unknown) so type definitions don’t become overly permissive over time.
Project status
- The source appears actively maintained, with recent updates that bump the TypeScript toolchain and CI (notably TypeScript 5.8.x in v1.2.2 and 5.9 in v1.3.0), and ongoing repository activity (last upstream push timestamped 2026-06-08).
- The update cadence looks like a few months per change, for example v1.2.2 (2025-07-06) to v1.3.0 (2025-12-08), followed by a documentation-only update in v1.2.1 earlier (2025-03-31).
AI summary generated Today
Recent updates
v1.3.0
6 months agov1.3.0 bumps the library and CI typechecking to TypeScript 5.9 and adjusts the type-level error reporting logic. The main user-visible change is improved compile-time error output when expected or actual types involve optional properties.
v1.2.2
11 months agov1.2.2 primarily updates the project’s TypeScript toolchain and CI. It includes a fix related to tsgo (with CI coverage), bumps TypeScript to 5.8.x, and adds a SECURITY.md policy document.
Securityv1.2.1
3/31/2025Release v1.2.1 only updates documentation in the README. The examples were adjusted to avoid deprecated `.toMatchTypeOf` usage and to reference the preferred alternatives.
v1.2.0
2/28/2025v1.2.0 adds new type assertion helpers, `.toMatchObjectType` and `.toExtend`, intended as replacements for the deprecated `.toMatchTypeOf`. It also introduces a `.map` utility for transforming types at compile time. The release notes focus on the deprecation and usage differences, but the code contains additional behavioral constraints for `.toMatchObjectType` not fully spelled out.
Featuresv1.1.0
10/9/2024This release adds support for asserting bigint types via a new expecter method, `toBeBigInt()`. It also extends type-printing logic so bigint and bigint literals display correctly in error messages. In addition to library changes, the repo updates CI test reporting and bumps dev dependencies related to Vitest.
Featuresv1.0.0
10/3/2024v1.0.0 is positioned as a non-functional “make it official” release based on prior v0.x and v1.0.0-rc.0 work, with usage documentation included for new users. The provided release notes do not describe any new user-facing features or behavioral changes for this final v1.0.0 tag.
v1.0.0-rc.0
9/10/2024The v1.0.0-rc.0 release notes state the release candidate is being published as-is, with no changes besides dev dependency updates since v0.20.0. However, the actual diff shows not only dependency bumps, but also a substantial change to the repository dependency sync GitHub Actions workflow and updated dev toolchain requirements.
v0.20.0
8/20/2024v0.20.0 focuses on improved TypeScript overload support, changing how expect-type derives parameter and return types from overloaded function types. It also re-exports the overload-related helpers from the package root and adds multiple documentation and JSDoc cleanups. CI and dev tooling were updated to include a new type-checking job (arethetypeswrong) and newer dev dependencies.
BreakingFeaturesv0.20.0-0
8/13/2024v0.20.0-0 is primarily a type-level overhaul focused on better handling of overloaded functions, updating how overload parameter and return types are surfaced through matchers like `.parameters`, `.returns`, `.parameter(...)`, and `.toBeCallableWith`. The codebase also underwent a significant internal refactor, moving major type helper logic out of `src/index.ts` into new modules such as `src/utils.ts`, `src/branding.ts`, `src/messages.ts`, and `src/overloads.ts`.
BreakingFeatures0.19.0
3/21/2024Release 0.19.0 documents a fix to make `.omit()` behave more like TypeScript's `Omit`, plus adds JSDoc across the codebase and tweaks the README. However, the actual diff shows a broader toolchain and CI overhaul (Jest to Vitest, ESLint config migration, CI coverage changes, and tsconfig target changes) that is not mentioned in the release notes.