class TransactionClosedError extends Error {
  constructor() {
    super("Transaction is closed");
  }
}
function throwIfClosed(tx) {
  if (tx.closed) {
    throw new TransactionClosedError();
  }
}
function rejectIfClosed(tx) {
  return tx.closed ? Promise.reject(new TransactionClosedError()) : void 0;
}
export {
  TransactionClosedError,
  rejectIfClosed,
  throwIfClosed
};
//# sourceMappingURL=transaction-closed-error.js.map
