// ets_tracing: off
import * as Ex from "../../../../Exit";
import * as O from "../../../../Option";
import * as CollectWhile from "./collectWhile";
/**
 * Terminates the stream when encountering the first `Exit.Failure`.
 */

export function collectWhileSuccess(self) {
  return CollectWhile.collectWhile_(self, Ex.fold(() => O.none, r => O.some(r)));
}
//# sourceMappingURL=collectWhileSuccess.js.map