Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Commit

Permalink
Fix CancelableOperation.valueOrCancellation's type signature (#68)
Browse files Browse the repository at this point in the history
* Fix CancelableOperation.valueOrCancellation's type signature

* Increment minor version, add changelog entry
  • Loading branch information
ds84182 authored and lrhn committed Jan 25, 2019
1 parent f902e28 commit 0f4c6fb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.1.0

* Fix `CancelableOperation.valueOrCancellation`'s type signature

## 2.0.8

* Set max SDK version to `<3.0.0`.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/cancelable_operation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class CancelableOperation<T> {
/// If this operation completes, this completes to the same result as [value].
/// If this operation is cancelled, the returned future waits for the future
/// returned by [cancel], then completes to [cancellationValue].
Future valueOrCancellation([T cancellationValue]) {
Future<T> valueOrCancellation([T cancellationValue]) {
var completer = new Completer<T>.sync();
value.then((result) => completer.complete(result),
onError: completer.completeError);
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: async
version: 2.0.9-dev
version: 2.1.0

description: Utility functions and classes related to the 'dart:async' library.
author: Dart Team <misc@dartlang.org>
Expand Down

0 comments on commit 0f4c6fb

Please sign in to comment.