bashor
03/25/2016, 4:15 PMvar Promise = require("promise”);
kotlin:
kotlin
@native class Promise<T>(f: (resolve: (T) -> Unit, reject: (dynamic) -> Unit) -> Unit) {
fun then(onFulfilled: (T) -> Unit, onRejected: (dynamic) -> Unit = { }): Promise<T> = noImpl
}
//….
var foo = new Promise<Int>({ …. })