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

1.1.3 • Public • Published

Installation

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

Summary

This package contains type definitions for redux-injectable-store (https://github.com/lelandrichardson/redux-injectable-store#readme).

Details

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

index.d.ts

import { Reducer, ReducersMapObject, Store, StoreEnhancer } from "redux";

/**
 * An `InjectableStore` allows reducers to "inject" themselves into the store
 * at any time, for use with bundle splitting, large apps, and SPAs
 * @template S State object type.
 */
export interface InjectableStore<S> extends Store<S> {
    inject: (namespace: string, reducer: Reducer<S>, force?: boolean) => void;
    injectAll: (reducers: ReducersMapObject, force?: boolean) => void;
    clearReducers: () => void;
}

export type WrapReducer<S> = (reducer: Reducer<S>) => Reducer<S>;

/**
 * The `createInjectableStore` API follows the same API as Redux's
 * `createStore`, but with the first argument (`reducer`) missing,
 * and an optional additional last argument, `wrapReducer`.
 *
 * @template S State object type.
 */
export interface InjectableStoreCreator {
    <S>(
        preloadedState?: S,
        enhancer?: StoreEnhancer<S>,
        wrapReducer?: WrapReducer<S>,
    ): InjectableStore<S>;
}

export const createInjectableStore: InjectableStoreCreator;

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: redux

Credits

These definitions were written by Daniel Perez Alvarez.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/redux-injectable-store

Weekly Downloads

7

Version

1.1.3

License

MIT

Unpacked Size

4.86 kB

Total Files

5

Last publish

Collaborators

  • types