UNPKG

abb-core

Version:

Application Build Butler Core

28 lines (27 loc) 1.17 kB
import * as React from 'react'; import { TABBKeyValuePair, IABBBasicProps } from '../../index'; import { AnyAction, ReducersMapObject } from 'redux'; export interface IABBPluginProps extends IABBBasicProps { } export interface IABBPlugin<P extends IABBPluginProps = IABBPluginProps, S extends object = {}> extends React.Component<P, S> { } export interface IABBPluginActionCreator<CS extends object = object, STR extends TABBKeyValuePair<Partial<CS>> = TABBKeyValuePair<Partial<CS>>, R extends ReducersMapObject<STR, AnyAction> = ReducersMapObject<STR, AnyAction>> { getReducersMapObject(): R; /** * To verify every reducer can setup initial state for a reduced set of global state. * This behavior is produced by the function FABBCombinedState * for example: * currentGlobalState === { * test1: "myFirstValue" * } * reducerTest2 ( state = { test2: "mySecondValue" }, action ) => { return state } * Results in: * currentGlobalState === { * test1: "myFirstValue", * test2: "mySecondValue" * } * * @param state {object} */ getStateToReducerMapObject(state: CS): STR; }