I have a function that uses suspendCoroutine. ```...
# coroutines
e
I have a function that uses suspendCoroutine.
Copy code
suspend fun get(): DocumentSnapshot = suspendCoroutine { continuation ->
        documentReference.get()
                .then { continuation.resume(DocumentSnapshot(it)) }
                .catch { continuation.resumeWithException(it) }
    }
In JS, it returns early with a CoroutineSuspendedMarker object. documentReference.get is a JS Promise.