</>PackageGraphPackageGraph

expect-type

npmv1.4.0TypeScript

[![CI](https://github.com/mmkal/expect-type/actions/workflows/ci.yml/badge.svg)](https://github.com/mmkal/expect-type/actions/workflows/ci.yml) ![npm](https://img.shields.io/npm/dt/expect-type) [![X Follow](https://img.shields.io/twitter/follow/mmkal)](ht

Safe to adopt

Yes — expect-type scores well across adoption, maintenance, weight, supply chain, and licensing. 78.4M downloads per week and 8 known dependents. Last published 76 days ago. 8 releases in the last 2 years.

  • AAdoption: grade A, Excellent.

    78.4M downloads per week and 8 known dependents.

  • AMaintenance: grade A, Excellent.

    Last published 76 days ago. 8 releases in the last 2 years.

  • AWeight: grade A, Excellent.

    Zero runtime dependencies, about 135 KB installed.

  • BSupply chain: grade B, Good.

    This package has a single maintainer (bus factor of 1).

  • ALicense: grade A, Excellent.

    Apache-2.0 — permissive, with no copyleft found in the dependency tree.

Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.

Install cost

What you actually take on by adding expect-type to a project.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

135 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

Longest resolved dependency chain below this package.

Compatibility

Node.js
node >=12.0.0
Module format
CommonJS only
TypeScript
Types included
Install scripts
None

Quick start

A usage example from the expect-type README.

import {expectTypeOf} from 'expect-type'
import {foo, bar} from '../foo'

// make sure `foo` has type {a: number}
expectTypeOf(foo).toEqualTypeOf<{a: number}>()

// make sure `bar` is a function taking a string:
expectTypeOf(bar).parameter(0).toBeString()
expectTypeOf(bar).returns.not.toBeAny()

expect-type vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
expect-typethis page78.4M8Apache-2.02 months ago
csstype142.8M2MIT1 day ago
jest42.1M70MIT1 day ago
chai057MIT1 day ago
jest-cli03MIT1 day ago
@jest/core02MIT1 day ago

Dependencies

Declared by expect-type v1.4.0. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (12)

@arethetypeswrong/cli 0.18.3@types/node ^24.0.0@typescript/native-preview 7.0.0-dev.20260609.1@vitest/ui ^4.0.0eslint ^8.57.0eslint-plugin-mmkal 0.9.0np ^11.0.0pkg-pr-new 0.0.75strip-ansi 7.2.0ts-morph 27.0.2typescript 5.9.3vitest ^4.0.0

Used by

Popular packages that depend on expect-type.

Relationship graph

Dependencies (left) and dependents (right) of expect-type.

Frequently installed together

Release history

5 releases in the last two years, typically about 24 days apart.

Recent versions of expect-type
VersionPublishedSizeLicense
1.4.0latest2 months ago135 KBApache-2.0
1.3.09 months ago117 KBApache-2.0
1.2.21 year ago116 KBApache-2.0
1.2.11 year ago113 KBApache-2.0
1.2.01 year ago113 KBApache-2.0
1.1.01 year ago108 KBApache-2.0
1.0.01 year ago106 KBApache-2.0
1.0.0-rc.02 years ago106 KBApache-2.0
0.20.02 years ago106 KBApache-2.0
0.20.0-02 years ago103 KBApache-2.0
0.19.02 years ago81 KBApache-2.0
0.18.02 years ago55 KBApache-2.0
0.17.32 years ago55 KBApache-2.0
0.17.3-02 years ago54 KBApache-2.0
0.17.22 years ago54 KBApache-2.0

Overview

expect-type is an npm package that [![CI](https://github.com/mmkal/expect-type/actions/workflows/ci.yml/badge.svg)](https://github.com/mmkal/expect-type/actions/workflows/ci.yml) ![npm](https://img.shields.io/npm/dt/expect-type) [![X Follow](https://img.shields.io/twitter/follow/mmkal)](ht. It is extremely widely used, with about 78.4M downloads per week and 8 known dependents in the graph. The latest version is 1.4.0, released under the Apache-2.0 license.

Who should use it

Teams working in the npm ecosystem who need [![CI](https://github.com/mmkal/expect-type/actions/workflows/ci.yml/badge.svg)](https://github.com/mmkal/expect-type/actions/workflows/ci.yml) ![npm](https://img.shields.io/npm/dt/expect-type) [![X Follow](https://img.shields.io/twitter/follow/mmkal)](ht and value a battle-tested, widely-adopted solution.

When not to use it

Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.

Pros

  • Large, well-established user base (78.4M weekly downloads).
  • Ships TypeScript type definitions.
  • Clear open-source license (Apache-2.0).

Cons

  • No significant drawbacks detected from available metadata.

Auto-generated from collected registry metadata. No external claims are inferred.

Maintainers

Keywords

Frequently asked questions

Should I use expect-type?

Yes — expect-type scores well across adoption, maintenance, weight, supply chain, and licensing. 78.4M downloads per week and 8 known dependents. Last published 76 days ago. 8 releases in the last 2 years.

How do I install expect-type?

Run `npm install expect-type` to add expect-type to your npm project.

What license is expect-type released under?

expect-type is distributed under the Apache-2.0 license.

How popular is expect-type?

expect-type has approximately 78,351,861 downloads per week and 8 known dependent packages.

Is expect-type still maintained?

The most recent release of expect-type (v1.4.0) was published 2 months ago.

Does expect-type run install scripts?

No. expect-type does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.