UNPKG

526 BPlain TextView Raw
1/**
2 * A Transaction is created by calling [Client#begin]{@link Client#begin}
3 *
4 * Part of `@stomp/stompjs`.
5 *
6 * TODO: Example and caveat
7 */
8export interface ITransaction {
9 /**
10 * You will need to access this to send, ack, or nack within this transaction.
11 */
12 id: string;
13
14 /**
15 * Commit this transaction. See [Client#commit]{@link Client#commit} for an example.
16 */
17 commit: () => void;
18
19 /**
20 * Abort this transaction. See [Client#abort]{@link Client#abort} for an example.
21 */
22 abort: () => void;
23}