UNPKG

@state-management/state-machine-react

Version:

React wrapper for simple-state-machine, provides fromState and useDispatcher hooks and unit test fixtures

14 lines (13 loc) 418 B
/// <reference types="jest" /> type MockStateMachineConfig = { defaultValue?: any; dispatchImplementation?: jest.Mock; }; export declare const setupMockStateMachine: ({ defaultValue, dispatchImplementation }: MockStateMachineConfig) => { onChange: jest.Mock<{ unsubscribe: jest.Mock<any, any>; }, []>; getLatest: jest.Mock<any, [key: any]>; dispatch: jest.Mock<any, any>; }; export {};