Edouard Goossens
07/30/2018, 9:13 AMsuspend 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.