UNPKG

typedux

Version:

Slightly adjusted Redux (awesome by default) for TS

34 lines (33 loc) 1.4 kB
import { BaseActionFactory } from "../../actions/BaseActionFactory"; import { MockKey } from "./MockConstants"; import { MockLeafState } from "./MockLeafState"; import type { MockMessage } from "./MockMessage"; import type { IMockState } from "./MockState"; import type { ObservableStore } from "../../store/ObservableStore"; export declare class MockActionFactory extends BaseActionFactory<MockLeafState, MockMessage> { constructor(store?: ObservableStore<any>); leaf(): typeof MockKey; mockUpdate(val: string): (state: IMockState) => { str1: string; type: string; mock: MockLeafState; toJS?: () => any; }; mockUpdateFromState(newVal: string): (state: Map<string, any>) => { str2: string; clear(): void; delete(key: string): boolean; forEach(callbackfn: (value: any, key: string, map: Map<string, any>) => void, thisArg?: any): void; get(key: string): any; has(key: string): boolean; set(key: string, value: any): Map<string, any>; size: number; [Symbol.iterator](): IterableIterator<[string, any]>; entries(): IterableIterator<[string, any]>; keys(): IterableIterator<string>; values(): IterableIterator<any>; [Symbol.toStringTag]: string; }; mockThunk(): globalThis.Promise<string>; mockThunkError(): globalThis.Promise<never>; }