TxHooksHandle
TypeSignature
type TxHooksHandle = {
discard: () => void;
flush: () => void | Promise<void>;
txHooks: TxHooks;
};core/src/tx-hooks/tx-hooks.ts:88
A TxHooks instance with flush and discard lifecycle methods.
- Call
flush()after the transaction commits to run the commit callbacks. It returns a promise only when a commit callback returned one. - Call
discard()on rollback to run the rollback callbacks instead.
Properties
discard
Signature
discard: () => void;core/src/tx-hooks/tx-hooks.ts:91
Returns
void
flush
Signature
flush: () => void | Promise<void>;core/src/tx-hooks/tx-hooks.ts:90
Returns
void |Promise<void>
- txHooks
TxHooks