style(async): add missing type annotation js/dart

This commit is contained in:
gdi2290 2015-01-04 00:38:24 -08:00 committed by vsavkin
parent e276716bde
commit 164cf5b2a3
2 changed files with 6 additions and 4 deletions

View File

@ -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);
}
}

View File

@ -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);
}
}
}