then

fun then(onFulfilled: (value: Any) -> Any = { it }): Promise
fun then(onFulfilled: (value: Any) -> Any, onRejected: (reason: Any) -> Any): Promise