-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FR]: Add @discardableResult
to CollectionReference.addDocument
#10640
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
If you want, you can create a PR. Otherwise, I can make the change. Thanks! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
Currently, when adding an Encodable document to a collection, the
addDocument
method returns aDocumentReference
. Often this is not need and thus generates a warning in Xcode which can be silenced byTo 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
The text was updated successfully, but these errors were encountered: