# @types/redux-saga-tester

> TypeScript definitions for redux-saga-tester

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

## Install

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

## 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-07-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 7.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51449 |
| Maintainers | types |

## Links

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

## Dependencies (2)

- [redux](https://npm.io/package/redux.md) ^3.7.2
- [redux-saga](https://npm.io/package/redux-saga.md) ^0.15.3

## Recent versions

- 1.0.8 (latest) — 2023-11-07
- 1.0.4 (ts4.1) — 2022-02-25
- 1.0.3 (ts3.7) — 2021-07-08
- 1.0.2 (ts3.0) — 2020-06-12
- 1.0.1 (ts2.8) — 2018-12-03
- 1.0.0 (ts2.3) — 2018-07-24
- 1.0.7 — 2023-10-18
- 1.0.6 — 2023-10-10
- 1.0.5 — 2023-09-27

## README

# Installation
> `npm install --save @types/redux-saga-tester`

# Summary
This package contains type definitions for redux-saga-tester (https://github.com/wix/redux-saga-tester#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/redux-saga-tester.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/redux-saga-tester/index.d.ts)
````ts
import { AnyAction, Middleware, Reducer, ReducersMapObject, Store } from "redux";
import { Task } from "redux-saga";

export type SagaFunction = (...args: any[]) => any;

export interface SagaTesterOptions<StateType> {
    initialState?: StateType | undefined;
    reducers?: ReducersMapObject | Reducer<StateType> | undefined;
    middlewares?: Middleware[] | undefined;
    combineReducers?: ((map: ReducersMapObject) => Reducer<StateType>) | undefined;
    ignoreReduxActions?: boolean | undefined;
    options?: object | undefined;
}

export default class SagaTester<StateType extends object> {
    constructor(options?: SagaTesterOptions<StateType>);

    /**
     * The reference of the redux store.
     */
    store: Store<StateType>;

    /**
     * Starts execution of the provided saga.
     */
    start(saga: SagaFunction, ...args: any[]): Task;

    /**
     * Dispatches an action to the redux store.
     */
    dispatch(action: AnyAction): void;

    /**
     * Assigns the newState into the current state. (Only works with the default reducer.)
     */
    updateState(state: StateType): void;

    /**
     * Returns the state of the redux store.
     */
    getState(): StateType;

    /**
     * Returns a promise that will resolve if the specified action is dispatched to the store.
     * @param actionType Action name.
     * @param futureOnly Causes waitFor to only resolve if the action is called in the future.
     */
    waitFor(actionType: string, futureOnly?: boolean): PromiseLike<AnyAction>;

    /**
     * Returns whether the specified was dispatched in the past.
     */
    wasCalled(actionType: string): boolean;

    /**
     * Returns the number of times an action with the given type was dispatched.
     */
    numCalled(actionType: string): number;

    /**
     * Returns the last action dispatched to the store.
     */
    getLatestCalledAction(): AnyAction;

    /**
     * Returns an array of all actions dispatched.
     */
    getCalledActions(): AnyAction[];

    /**
     * Reset the store state back to initialState
     * @param clearActionList Clears the history of past actions (defaults to false).
     */
    reset(clearActionList?: boolean): void;
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: [redux](https://npmjs.com/package/redux), [redux-saga](https://npmjs.com/package/redux-saga)

# Credits
These definitions were written by [Ben Lorantfy](https://github.com/BenLorantfy), [Law Smith](https://github.com/lawsumisu), and [Björn Böing](https://github.com/BreakBB).

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