2014-09-30 14:56:33 -04:00
|
|
|
library angular.core.facade.async;
|
|
|
|
|
|
|
|
import 'dart:async';
|
|
|
|
export 'dart:async' show Future;
|
|
|
|
|
|
|
|
class FutureWrapper {
|
|
|
|
static Future value(obj) {
|
|
|
|
return new Future.value(obj);
|
|
|
|
}
|
|
|
|
|
2014-10-07 09:04:11 -04:00
|
|
|
static Future error(obj) {
|
|
|
|
return new Future.error(obj);
|
|
|
|
}
|
|
|
|
|
2014-09-30 14:56:33 -04:00
|
|
|
static Future wait(List<Future> futures){
|
|
|
|
return Future.wait(futures);
|
|
|
|
}
|
2014-10-07 09:04:11 -04:00
|
|
|
|
|
|
|
static Future catchError(Future future, Function onError){
|
|
|
|
return future.catchError(onError);
|
|
|
|
}
|
2014-09-30 14:56:33 -04:00
|
|
|
}
|