continuation in let listener = Firestore.firestore().collection(“issues”) .addSnapshotListener { snapshot, error in if let error { continuation.finish(throwing: error) return } let issues = snapshot?.documents?.map(Issue.init) ?? [] continuation.yield(issues) } continuation.onTermination = { _ in listener.remove() } }