Doing this in the router mapper: ``` //... if (Con...
# coroutines
d
Doing this in the router mapper:
Copy code
//...
if (Continuation::class.java.isAssignableFrom(paramType)) {
	deferred = Promise.Deferred<Any>()
	args += deferred.toContinuation()
	//throw RuntimeException("Continuations not yet implemented")
}
//...

val result = method.invoke(instance, *args.toTypedArray())

if (result != CoroutineIntrinsics.SUSPENDED && deferred != null) {
	deferred.resolve(result)
}