UNPKG

typedux

Version:

Slightly adjusted Redux (awesome by default) for TS

12 lines (11 loc) 441 B
import type { State } from "./State"; import type { ActionMessage } from "../actions"; import type { ILeafReducer } from "./LeafReducer"; export default class DumbReducer<S extends State<string>> implements ILeafReducer<S, ActionMessage<S>> { private readonly key; private readonly providedState; constructor(keyOrState: string | State<string>); leaf(): string; prepareState(o: any): any; defaultState(o?: any): S; }