We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ee7ff0 commit 14a8d99Copy full SHA for 14a8d99
Sources/SHFirestoreService/FirestoreAccessible.swift
@@ -14,4 +14,15 @@ public protocol FirestoreAccessible {
14
var collectionRef: CollectionReference { get }
15
var documentRef: DocumentReference? { get }
16
}
17
+
18
+// MARK: - Helpers
19
+extension FirestoreAccessible {
20
+ var asCollectionRef: CollectionReference? {
21
+ return self as? CollectionReference
22
+ }
23
24
+ var asDocumentRef: DocumentReference? {
25
+ return self as? DocumentReference
26
27
+}
28
#endif
0 commit comments