UNPKG

796 BTypeScriptView Raw
1import { AtomicStateNodeConfig, StatesConfig, Event, EventObject, StateSchema } from './types';
2export declare function toggle<TEventType extends string = string>(onState: string, offState: string, eventType: TEventType): Record<string, AtomicStateNodeConfig<any, {
3 type: TEventType;
4}>>;
5interface SequencePatternOptions<TEvent extends EventObject> {
6 nextEvent: Event<TEvent> | undefined;
7 prevEvent: Event<TEvent> | undefined;
8}
9export declare function sequence<TStateSchema extends StateSchema, TEvent extends EventObject>(items: Array<keyof TStateSchema['states']>, options?: Partial<SequencePatternOptions<TEvent>>): {
10 initial: keyof TStateSchema['states'];
11 states: StatesConfig<any, TStateSchema, TEvent>;
12};
13export {};
14//# sourceMappingURL=patterns.d.ts.map
\No newline at end of file