runUnsafe method

Future<A> runUnsafe([
  1. Context<R>? context
])

Runs this effect unsafely, throwing on failure

Implementation

Future<A> runUnsafe([Context<R>? context]) async {
  final exit = await runToExit(context);
  return switch (exit) {
    Success(:final value) => value,
    Failure(:final cause) => throw cause.toException(),
  };
}