Skip to content

Commit c1e3e15

Browse files
committed
update
1 parent e21fcaa commit c1e3e15

4 files changed

Lines changed: 16 additions & 11 deletions

File tree

lib/src/ergonomics/typedefs.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ import '/_common.dart';
1717
typedef TResultStream<T extends Object> = Stream<Result<T>>;
1818

1919
typedef TOnErrorCallback<T extends Object> = Err<T> Function(
20-
Object? error, StackTrace stackTrace);
20+
Object? error,
21+
StackTrace stackTrace,
22+
);
2123

2224
typedef TVoidCallback = void Function();

lib/src/outcomes/option/_option.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ part of '../outcome.dart';
1616

1717
/// A [Outcome] that represents an optional value: every [Option] is either
1818
/// [Some] and contains a value, or [None] and does not.
19-
sealed class Option<T extends Object> extends Outcome<T>
20-
implements SyncImpl<T> {
19+
sealed class Option<T extends Object> extends Outcome<T> implements SyncImpl<T> {
2120
/// Combines 2 [Option] outcomes into 1 containing a tuple of their values if
2221
/// all are [Some].
2322
///
@@ -37,9 +36,11 @@ sealed class Option<T extends Object> extends Outcome<T>
3736
/// Returns [None] if any are [None].
3837
///
3938
/// See also: [combineOption].
40-
static Option<(T1, T2, T3)>
41-
combine3<T1 extends Object, T2 extends Object, T3 extends Object>(
42-
Option<T1> o1, Option<T2> o2, Option<T3> o3) {
39+
static Option<(T1, T2, T3)> combine3<T1 extends Object, T2 extends Object, T3 extends Object>(
40+
Option<T1> o1,
41+
Option<T2> o2,
42+
Option<T3> o3,
43+
) {
4344
return combineOption<Object>([
4445
o1,
4546
o2,

lib/src/tools/task_batch_base.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,4 +151,6 @@ abstract class TaskBatchBase<T extends Object> {
151151
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
152152

153153
typedef TOnTaskConpletedCallback<T extends Object> = Resolvable<Unit> Function(
154-
Task<T> task, double executionProgress);
154+
Task<T> task,
155+
double executionProgress,
156+
);

lib/src/tools/task_sequencer.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,8 @@ class TaskSequencer<T extends Object> {
162162
}
163163

164164
// Execute the main task handler.
165-
final output = task
166-
.handler(previousResult)
167-
.withMinDuration(task.minTaskDuration ?? _minTaskDuration);
165+
final output =
166+
task.handler(previousResult).withMinDuration(task.minTaskDuration ?? _minTaskDuration);
168167
// Combine the task's result with any error-handling side effects.
169168
return Resolvable.combine2(output, errorResolvable).then((e) => e.$1);
170169
}
@@ -183,7 +182,8 @@ class TaskSequencer<T extends Object> {
183182
/// A function that defines a step in a task sequence.
184183
/// It receives the result of the `previous` task.
185184
typedef TTaskHandler<T extends Object> = TResolvableOption<T> Function(
186-
TResultOption<T> previous);
185+
TResultOption<T> previous,
186+
);
187187

188188
/// A function that handles an error from a previous task as a side-effect.
189189
typedef TOnTaskError = Resolvable Function(Err err);

0 commit comments

Comments
 (0)