# @types/ioredis-mock

> TypeScript definitions for ioredis-mock

Latest version **8.2.8** (published 2026-08-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/ioredis-mock
pnpm add @types/ioredis-mock
yarn add @types/ioredis-mock
bun add @types/ioredis-mock
```

## Health

**Score 70/100 (B)** — status: active.

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

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 8.2.8 |
| Published | 2026-08-03 |
| First published | 2021-08-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51419 |
| Maintainers | types |

## Links

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

## Recent versions

- 8.2.8 (latest) — 2026-08-03
- 8.2.7 (ts5.3) — 2026-03-06
- 8.2.6 (ts5.1) — 2025-05-15
- 8.2.5 (ts4.6) — 2023-11-07
- 8.2.2 (ts4.3) — 2023-05-13
- 8.2.1 (ts4.2) — 2022-12-09
- 5.6.0 (ts4.0) — 2021-08-30
- 8.2.4 — 2023-10-18
- 8.2.3 — 2023-09-26
- 8.2.0 — 2022-10-26

## README

# Installation
> `npm install --save @types/ioredis-mock`

# Summary
This package contains type definitions for ioredis-mock (https://github.com/stipsan/ioredis-mock#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ioredis-mock.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ioredis-mock/index.d.ts)
````ts
import ioredis = require("ioredis");

declare namespace redisMock {
    type RedisOptions = { data?: Record<string, unknown> } & ioredis.RedisOptions;

    type RedisClusterOptions = {
        redisOptions: Omit<
            RedisOptions,
            "port" | "host" | "path" | "sentinels" | "retryStrategy" | "enableOfflineQueue" | "readOnly"
        >;
    } & ioredis.ClusterOptions;

    interface ClusterConstructor {
        new(startupNodes: ioredis.ClusterNode[], options?: RedisClusterOptions): ioredis.Cluster;
    }

    interface Constructor {
        new(port: number, host: string, options: RedisOptions): ioredis.Redis;
        new(path: string, options: RedisOptions): ioredis.Redis;
        new(port: number, options: RedisOptions): ioredis.Redis;
        new(port: number, host: string): ioredis.Redis;
        new(options: RedisOptions): ioredis.Redis;
        new(port: number): ioredis.Redis;
        new(path: string): ioredis.Redis;
        new(): ioredis.Redis;
        Cluster: ClusterConstructor;
    }
}

declare const redisMock: redisMock.Constructor;
export = redisMock;

````

### Additional Details
 * Last updated: Mon, 03 Aug 2026 19:30:30 GMT
 * Dependencies: none
 * Peer dependencies: [ioredis](https://npmjs.com/package/ioredis)

# Credits
These definitions were written by [Lukas Elmer](https://github.com/lukaselmer).

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