export declare type State = { executed?: -1 | 0 | 1; result?: unknown; execute: (any: any) => unknown; next?: (state: State, states: State[]) => State; error?: (state: State, states: State[]) => State; }; export declare function stateMachine(states: State[], timeout?: number): Promise;