Socket
Socket
Sign inDemoInstall

@types/redux-mock-store

Package Overview
Dependencies
3
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @types/redux-mock-store

TypeScript definitions for redux-mock-store


Version published
Weekly downloads
646K
increased by5.62%
Maintainers
1
Install size
460 kB
Created
Weekly downloads
 

Readme

Source

Installation

npm install --save @types/redux-mock-store

Summary

This package contains type definitions for redux-mock-store (https://github.com/dmitry-zaets/redux-mock-store).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/redux-mock-store.

index.d.ts

import * as Redux from "redux";

export interface MockStore<S = any, A extends Redux.Action = Redux.AnyAction> extends Redux.Store<S, A> {
    getActions(): any[];
    clearActions(): void;
}

export type MockStoreEnhanced<S = {}, DispatchExts = {}> = MockStore<S> & { dispatch: DispatchExts };

export type MockStoreCreator<S = {}, DispatchExts = {}> = (
    state?: S | MockGetState<S>,
) => MockStoreEnhanced<S, DispatchExts>;

export type MockGetState<S = {}> = (actions: Redux.AnyAction[]) => S;

/**
 * Create Mock Store returns a function that will create a mock store from a state
 * with the same set of set of middleware applied.
 *
 * @param middlewares The list of middleware to be applied.
 * @template S The type of state to be held by the store.
 * @template DispatchExts The additional Dispatch signatures for the middlewares applied.
 */
declare function createMockStore<S, DispatchExts = {}>(
    middlewares?: Redux.Middleware[],
): MockStoreCreator<S, DispatchExts>;

export default createMockStore;

Additional Details

  • Last updated: Tue, 07 Nov 2023 20:08:00 GMT
  • Dependencies: redux

Credits

These definitions were written by Marian Palkus, and Cap3.

FAQs

Last updated on 07 Nov 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc