atombeak
Version:
Create asynchronous atomic functions!
16 lines (15 loc) • 598 B
TypeScript
import { Message } from './Message';
import { Command } from './Command';
import { Operation } from '../Operation/Operation';
export declare class Transaction<Outer, Inner, Action> {
private originalOperation;
private readonly dispatch;
private messages;
private isExecuting;
isDone: boolean;
private state;
private operation;
constructor(originalOperation: Operation<Outer, Inner, Action>, outer: Outer, dispatch: (action: Action) => void);
push(message: Message<Outer, Inner, Action>): void;
executeCommand(command: Command<Outer, Inner, Action>): void;
}