Napoleon's Penguin Mascot

    @types/redux-logic-test
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.1 • Public • Published

    Installation

    npm install --save @types/redux-logic-test

    Summary

    This package contains type definitions for redux-logic-test (https://github.com/jeffbski/redux-logic-test).

    Details

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

    index.d.ts

    // Type definitions for redux-logic-test 2.0
    // Project: https://github.com/jeffbski/redux-logic-test
    // Definitions by: Felipe Plets <https://github.com/felipeplets>
    // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
    
    import { Middleware, Reducer, Store } from 'redux';
    
    import { Action, Logic, LogicMiddleware } from 'redux-logic';
    
    export interface MockStore<State extends object, Actions extends Action> extends Store<State, Actions> {
        resetActions(): void;
        whenComplete(callback: () => void): ReturnType<LogicMiddleware['whenComplete']>;
    
        actions: {
            enumerable: true;
            get(): Actions[];
        };
        logicMiddleware: LogicMiddleware;
    }
    
    export interface CreateMockStoreOptions<State extends object, Dependency extends object> {
        initialState?: State | undefined;
        reducer?: Reducer | undefined;
        logic?: Array<Logic<State, Dependency>> | undefined;
        injectedDeps?: Dependency | undefined;
        middleware?: Middleware[] | undefined;
    }
    
    export interface CreateMockStore {
        <State extends object>(
            options?: CreateMockStoreOptions<State, object> | CreateMockStoreOptions<State, {}>,
        ): MockStore<State, Action>;
    }
    
    export const createMockStore: CreateMockStore;

    Additional Details

    Credits

    These definitions were written by Felipe Plets.

    Keywords

    none

    Install

    npm i @types/redux-logic-test

    DownloadsWeekly Downloads

    1,317

    Version

    2.0.1

    License

    MIT

    Unpacked Size

    5.28 kB

    Total Files

    4

    Last publish

    Collaborators

    • types