import Observable from "./observable"; import Event from "./event"; import { Transformer } from "./transform"; /** * State machine function used in [withStateMachine](classes/observable.html#withstatemachine). */ export interface StateF { /** * * @param state current state of the state machine. * @param event input event to react on * @return a tuple containing the next state and an array of events to be emitted. @typeparam State type of machine state @typeparam Out type of values to be emitted @typeparam In type of values in the input events */ (state: State, event: Event): [State, Event[]]; } /** @hidden */ export declare function withStateMachine(initState: State, f: StateF, src: Observable): Observable; export default withStateMachine; export declare function withStateMachineT(initState: State, f: StateF): Transformer;