Index: lib/src/delegate/future.dart |
diff --git a/lib/src/delegate/future.dart b/lib/src/delegate/future.dart |
index e30d41d94fd7264dba52a2d80dbd13fbc2af7588..ff9da062b6ce665c98dd3434d8f8d6868820e0f0 100644 |
--- a/lib/src/delegate/future.dart |
+++ b/lib/src/delegate/future.dart |
@@ -19,19 +19,20 @@ class DelegatingFuture<T> implements Future<T> { |
/// This soundly converts a [Future] to a `Future<T>`, regardless of its |
/// original generic type, by asserting that its value is an instance of `T` |
/// whenever it's provided. If it's not, the future throws a [CastError]. |
- static Future/*<T>*/ typed/*<T>*/(Future future) => |
- future is Future/*<T>*/ ? future : new TypeSafeFuture/*<T>*/(future); |
+ static Future<T> typed<T>(Future future) => future is Future<T> |
+ ? future |
+ : new TypeSafeFuture<T>(future); |
Stream<T> asStream() => _future.asStream(); |
Future<T> catchError(Function onError, {bool test(Object error)}) => |
- _future.catchError(onError, test: test); |
+ _future.catchError(onError, test: test); |
- Future/*<S>*/ then/*<S>*/(dynamic onValue(T value), {Function onError}) => |
- _future.then(onValue, onError: onError); |
+ Future<S> then<S>(dynamic onValue(T value), {Function onError}) => _future |
nweiz
2017/01/31 22:28:58
Putting [_future] way out on the right seems less
Lasse Reichstein Nielsen
2017/02/01 06:51:37
I just ran dartfmt on all changed files, I didn't
nweiz
2017/02/01 20:41:29
Unless we're going to adopt a policy of always aut
|
+ .then(onValue, onError: onError); |
Future<T> whenComplete(action()) => _future.whenComplete(action); |
Future<T> timeout(Duration timeLimit, {onTimeout()}) => |
- _future.timeout(timeLimit, onTimeout: onTimeout); |
+ _future.timeout(timeLimit, onTimeout: onTimeout); |
} |