Description
Currently, when adding an Encodable document to a collection, the addDocument method returns a DocumentReference. Often this is not need and thus generates a warning in Xcode which can be silenced by
let _ = try Firestore.firestore().collection("collectionName").addDocument(from: encodable)
To improve developer experience I suggest to add the @discardableResult attribute to the addDocument method which will tell the Swift compiler that it is okay for the return value to be unused.
See required changes here: Eskils@c44c187
API Proposal
No response
Firebase Product(s)
Firestore