kotlin-stdlib / kotlin.js / Promise / then then JS 1.1 open fun < S > then ( onFulfilled : ( ( T ) -> S ) ? ) : Promise < S > (source) open fun < S > then ( onFulfilled : ( ( T ) -> S ) ? , onRejected : ( ( Throwable ) -> S ) ? ) : Promise < S > (source)