refactor(Async): Unify TS and Dart PromiseCompleter naming

Also add explicit typing wherever we use PromiseCompleter
This commit is contained in:
Jason Teplitz
2015-07-24 17:24:28 -07:00
parent a8b57256c8
commit 7cbaf1076f
10 changed files with 41 additions and 27 deletions

View File

@ -29,7 +29,7 @@ class PromiseWrapper {
return promise.catchError(onError);
}
static CompleterWrapper completer() => new CompleterWrapper(new Completer());
static PromiseCompleter<dynamic> completer() => new PromiseCompleter(new Completer());
}
class TimerWrapper {
@ -104,10 +104,10 @@ class EventEmitter extends Stream {
}
}
class CompleterWrapper {
final Completer c;
class PromiseCompleter<T> {
final Completer<T> c;
CompleterWrapper(this.c);
PromiseCompleter(this.c);
Future get promise => c.future;