# @types/invariant

> TypeScript definitions for invariant

Latest version **2.2.37** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/invariant
pnpm add @types/invariant
yarn add @types/invariant
bun add @types/invariant
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.2.37 |
| Published | 2023-11-07 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51446 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/invariant
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/invariant
- npm.io page: https://npm.io/package/@types/invariant

## Recent versions

- 2.2.37 (latest) — 2023-11-07
- 2.2.35 (ts3.7) — 2021-08-26
- 2.2.34 (ts3.1) — 2020-09-01
- 2.2.33 (ts3.0) — 2020-05-15
- 2.2.32 (ts2.8) — 2020-04-23
- 2.2.30 (ts2.0) — 2019-07-01
- 2.2.36 — 2023-10-18
- 2.2.31 — 2019-12-20
- 2.2.29 — 2017-08-21
- 2.2.28 — 2016-09-19
- 2.2.27 — 2016-07-14
- 2.2.26-alpha — 2016-07-08
- 2.2.25-alpha — 2016-07-04
- 2.2.24-alpha — 2016-07-02
- 2.2.23-alpha — 2016-07-01
- … 5 more at https://npm.io/package/@types/invariant/versions

## README

# Installation
> `npm install --save @types/invariant`

# Summary
This package contains type definitions for invariant (https://github.com/zertosh/invariant).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/invariant.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/invariant/index.d.ts)
````ts
declare let invariant: invariant.InvariantStatic;

export = invariant;
export as namespace invariant;

declare namespace invariant {
    interface InvariantStatic {
        (testValue: false, format: string, ...extra: any[]): never;
        (testValue: any, format: string, ...extra: any[]): asserts testValue;
    }
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 03:09:37 GMT
 * Dependencies: none

# Credits
These definitions were written by [MichaelBennett](https://github.com/bennett000), [dtinth](https://github.com/dtinth), and [Turadg Aleahmad](https://github.com/turadg).

---
_Source: https://npm.io/package/@types/invariant · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
