style(async): add missing type annotation js/dart
This commit is contained in:
parent
e276716bde
commit
164cf5b2a3
|
@ -25,7 +25,7 @@ class PromiseWrapper {
|
|||
return new _Completer(new Completer());
|
||||
}
|
||||
|
||||
static setTimeout(fn, millis) {
|
||||
static setTimeout(Function fn, int millis) {
|
||||
new Timer(new Duration(milliseconds: millis), fn);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import {int} from 'facade/lang';
|
||||
import {List} from 'facade/collection';
|
||||
export var Promise = window.Promise;
|
||||
|
||||
export class PromiseWrapper {
|
||||
|
@ -9,7 +11,7 @@ export class PromiseWrapper {
|
|||
return Promise.reject(obj);
|
||||
}
|
||||
|
||||
static all(promises):Promise {
|
||||
static all(promises:List):Promise {
|
||||
if (promises.length == 0) return Promise.resolve([]);
|
||||
return Promise.all(promises);
|
||||
}
|
||||
|
@ -34,7 +36,7 @@ export class PromiseWrapper {
|
|||
};
|
||||
}
|
||||
|
||||
static setTimeout(fn, millis) {
|
||||
static setTimeout(fn:Function, millis:int) {
|
||||
window.setTimeout(fn, millis);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue