Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

eslint-plugin-expect-type

Latest version: v0.7.3

Overview

Last scanned
24 Nov 2026
Published
24 Nov 2026
npm package Publisher: danvk, igor.bezkrovnyi, joshuakgoldberg
120 Stars
6 Forks
4 Versions
110.1K Downloads
TypeScript Repo language

Scan summary

eslint-plugin-expect-type was last scanned on 24 Nov 2026 at version 0.7.3. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 4 versions; the latest 3 were published within 6 days (19–24 Nov 2026).
  • Findings: No rules fired in version 0.7.3.
  • Downloads: 110,067 downloads.

Versions

4 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.7.3 LATEST 24 Nov 2026 No rules fired
0.7.2 19 Nov 2026 No rules fired
0.7.1 19 Nov 2026 No rules fired
0.7.0 19 Sep 2026 Not shown

No rules fired in 0.7.3

Findings

Findings for v0.7.3. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.7.3; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

let value = 9001;
//  ^? let value: number

// $ExpectError
value = "over nine thousand";

// $ExpectType number
9001;

Installation

Make sure you have TypeScript and @typescript-eslint/parser installed, then install the plugin:

npm i -D eslint-plugin-expect-type

See typescript-eslint's Getting Started docs for how to run ESLint on TypeScript files.

Usage

Add the following options to your ESLint configuration file:

import expectType from "eslint-plugin-expect-type/configs/recommended";

export default [
    // your other ESLint configurations
    expectType,
];

For CommonJS, use const expectType = require("eslint-plugin-expect-type/configs/recommended").default;.

Then, you'll be able to use ^?, $ExpectError, $ExpectType, and $ExpectTypeSnapshot comments in code assert on types.

Usage (Legacy Config)

If you're still using the legacy ESLint configuration file format:

{
    "extends": ["plugin:expect-type/recommended"],
    "plugins": ["expect-type"]
}

Rules

💼 Configurations enabled in.\ ✅ Set in the recommended configuration.\ 🔧 Automatically fixable by the --fix CLI option.\ 💭 Requires type information.

Name Description 💼 🔧 💭
expect Expects type error, type snapshot, or type. ✅ 🔧 💭

References

You might consider using other popular libraries and tools that can run type assertions:

  • expect-type: Provides functions that return assorted generic type assertion methods, such as expectTypeOf('abc').toMatchTypeOf<string>().
  • ts-expect: Provides generic type assertion function, used like expectType<string>('abc')().
  • tsd: Allows writing tests specifically for .d.ts definition files.
  • TSTyche: A type testing tool that ships with describe() and test() helpers, expect style assertions and a mighty test runner which allows to use specified version of TypeScript.
  • Vitest: Includes assertType and expectTypeOf assertions.

TypeScript Version Support

eslint-plugin-expect-type mirrors the DefinitelyTyped TypeScript Support Window. Roughly, that's major versions of TypeScript less than 2 years old.

Appreciation

Many thanks to @ibezkrovnyi for creating the initial version and core infrastructure of this package! 💖

Development

See .github/CONTRIBUTING.md, then .github/DEVELOPMENT.md. Thanks! 🧩

Contributors

💝 This package was templated with create-typescript-app using the Bingo framework.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm eslint-plugin-expect-type

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Frame 2085668439 (1)
Group 1261154229