UNPKG

@empathyco/x-components

Version:
31 lines 812 B
import type { Machine } from './services.types'; /** * Default implementation for the {@link StateMachine}. * * @public */ export declare class StateMachine<SomeStatus extends string, SomeEvent extends string> { /** * A {@link Machine} having the different steps transition. * * @internal */ private machine; /** * The current state of the machine. * * @public */ currentState: SomeStatus; constructor(machine: Machine<SomeStatus, SomeEvent>); /** * Determines which state will be the next to be transitioned. * * @param event - The event to determine which state is the new one to be * transitioned. * * @public */ transition(event: SomeEvent): void; } //# sourceMappingURL=state-machine.service.d.ts.map