# @types/redux-testkit

> TypeScript definitions for redux-testkit

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

## Install

```sh
npm install @types/redux-testkit
pnpm add @types/redux-testkit
yarn add @types/redux-testkit
bun add @types/redux-testkit
```

## 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 | 1.0.8 |
| Published | 2023-11-07 |
| First published | 2018-06-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51438 |
| Maintainers | types |

## Links

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

## Dependencies (2)

- [redux](https://npm.io/package/redux.md) *
- [redux-thunk](https://npm.io/package/redux-thunk.md) *

## Recent versions

- 1.0.8 (latest) — 2023-11-07
- 1.0.5 (ts3.0) — 2020-05-15
- 1.0.3 (ts2.3) — 2018-10-20
- 1.0.2 (ts2.1) — 2018-07-26
- 1.0.7 — 2023-10-18
- 1.0.6 — 2023-09-27
- 1.0.4 — 2020-05-15
- 1.0.1 — 2018-07-24
- 1.0.0 — 2018-06-01

## README

# Installation
> `npm install --save @types/redux-testkit`

# Summary
This package contains type definitions for redux-testkit (https://github.com/wix/redux-testkit#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/redux-testkit.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/redux-testkit/index.d.ts)
````ts
import * as Redux from "redux";
import { ThunkAction } from "redux-thunk";

export interface ReducerTestkit {
    expect: (action: Redux.Action) => {
        toReturnState(expected: any): void;
        toStayTheSame(): void;
        toChangeInState(expectedChanges: any): void;
    };
    execute(action: Redux.Action): any; // state
}

export interface ThunkTestkit {
    execute(...args: any[]): any;
}

export function Reducer(action: Redux.Reducer): ReducerTestkit & {
    withState(state: any): ReducerTestkit;
};

export function Selector(selector: (state: any, action: any) => any): {
    expect(state: any, ...args: any[]): {
        toReturn(expected: any): void;
    };
    execute(state: any, ...args: any[]): any;
};

export function Thunk(thunkFunc: ThunkAction<any, any, any, any>, extraArg?: any): ThunkTestkit & {
    withState(state: any): ThunkTestkit;
};

export namespace FlushThunks {
    function createMiddleware(): Redux.Middleware & {
        flush(): void;
        reset(): void;
    };
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: [redux](https://npmjs.com/package/redux), [redux-thunk](https://npmjs.com/package/redux-thunk)

# Credits
These definitions were written by [Andrey Kizimov](https://github.com/Bookler96).

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