import { maybeTransactionIsClosedRejection } from "./throw-if-closed.js";
class ReadImpl {
  #map;
  #release;
  #closed = false;
  constructor(map, release) {
    this.#map = map;
    this.#release = release;
  }
  release() {
    this.#release();
    this.#closed = true;
  }
  get closed() {
    return this.#closed;
  }
  has(key) {
    return maybeTransactionIsClosedRejection(this) ?? Promise.resolve(this.#map.has(key));
  }
  get(key) {
    return maybeTransactionIsClosedRejection(this) ?? Promise.resolve(this.#map.get(key));
  }
}
export {
  ReadImpl
};
//# sourceMappingURL=read-impl.js.map
