We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 695923d commit fc50829Copy full SHA for fc50829
modules/angular2/src/core/facade/promise.dart
@@ -34,6 +34,10 @@ class PromiseWrapper {
34
async.scheduleMicrotask(fn);
35
}
36
37
+ static bool isPromise(obj) {
38
+ return obj is Future;
39
+ }
40
+
41
static PromiseCompleter<dynamic> completer() =>
42
new PromiseCompleter(new Completer());
43
modules/angular2/src/core/facade/promise.ts
@@ -44,6 +44,8 @@ export class PromiseWrapper {
44
PromiseWrapper.then(PromiseWrapper.resolve(null), computation, (_) => {});
45
46
47
+ static isPromise(obj: any): boolean { return obj instanceof Promise; }
48
49
static completer(): PromiseCompleter<any> {
50
var resolve;
51
var reject;
0 commit comments