const fileName_1 = "(@effect/core) _src/stream/Channel/operations/interruptWhenDeferred.ts";
import * as tsplus_module_1 from "@effect/core/stream/Channel/operations/interruptWhen";
/**
 * Returns a new channel, which is the same as this one, except it will be
 * interrupted when the specified deferred is completed. If the deferred is
 * completed before the underlying channel is done, then the returned channel
 * will yield the value of the deferred. Otherwise, if the underlying channel
 * finishes first, then the returned channel will yield the value of the
 * underlying channel.
 *
 * @tsplus fluent ets/Channel interruptWhenDeferred
 */

export function interruptWhenDeferred_(self, deferred) {
  return tsplus_module_1.interruptWhen_(self, () => deferred().await(fileName_1 + ":25:45"));
}
/**
 * Returns a new channel, which is the same as this one, except it will be
 * interrupted when the specified deferred is completed. If the deferred is
 * completed before the underlying channel is done, then the returned channel
 * will yield the value of the deferred. Otherwise, if the underlying channel
 * finishes first, then the returned channel will yield the value of the
 * underlying channel.
 *
 * @tsplus static ets/Channel/Aspects interruptWhenDeferred
 */

export const interruptWhenDeferred = deferred => self => interruptWhenDeferred_(self, deferred);
//# sourceMappingURL=interruptWhenDeferred.mjs.map