onSettled

fun KiteJs.onSettled(value: JsValue, onSettled: (JsValue, JsValue?) -> Unit): Boolean

Registers onSettled on a promise. It is called with the value and a null error on success, or with undefined and the reason on failure. Returns false if the value was not thenable at all.