function storeError() {
  return new Error("Store is closed");
}
function transactionError() {
  return new Error("Transaction is closed");
}
function throwIfStoreClosed(store) {
  if (store.closed) {
    throw storeError();
  }
}
function throwIfTransactionClosed(transaction) {
  if (transaction.closed) {
    throw transactionError();
  }
}
function transactionIsClosedRejection() {
  return Promise.reject(transactionError());
}
function maybeTransactionIsClosedRejection(transaction) {
  return transaction.closed ? transactionIsClosedRejection() : void 0;
}
function storeIsClosedRejection() {
  return Promise.reject(storeError());
}
export {
  maybeTransactionIsClosedRejection,
  storeIsClosedRejection,
  throwIfStoreClosed,
  throwIfTransactionClosed,
  transactionIsClosedRejection
};
//# sourceMappingURL=throw-if-closed.js.map
