import * as tsplus_module_1 from "@effect/core/stm/STM/operations/fromEither";
import * as tsplus_module_2 from "@tsplus/stdlib/data/Maybe/map";
import * as tsplus_module_3 from "@effect/core/stm/TRef/operations/get";
import * as tsplus_module_4 from "@effect/core/stm/STM/operations/collect";
import * as tsplus_module_5 from "@effect/core/stm/STM/operations/flatten";
export const await_ = await_1;
import { concreteTDeferred } from "@effect/core/stm/TDeferred/operations/_internal/InternalTDeferred";
/**
 * @tsplus getter ets/TDeferred await
 */

function await_1(self) {
  void 0;
  return tsplus_module_5.flatten(tsplus_module_4.collect(tsplus_module_3.get(self.ref), _ => tsplus_module_2.map_(_, e => tsplus_module_1.fromEither(() => e))));
}

export { await_1 as await };
//# sourceMappingURL=await.mjs.map