Replies: 1 comment 3 replies
-
Related to this, and naming is the I'd like to give a better suggestion but cannot. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Disclaimer: I'm not convinced making
serverTimestamp
not be a function is a good thing. What do you others think?In the Firebase Firestore 8.x API we do:
I've never stopped to think why that's a function, but now I did, with the
@exp
API. I somehow expected the parantheses to have been dropped, but they weren't. It's still:Of the five
FieldValue
s,arrayRemove
,arrayUnion
andincrement
need parameters. They are generators for the actual sentinels.serverTimestamp
anddelete
don't have parameters, and I presume there's always the same sentinel returned by them.This is not a big thing. But.. interfaces also convey the meaning to us humans. To me, exporting the sentinels themselves would make sense, from an interface clarity point of view.
Is there a reason why
serverTimestamp
needs to be called?Beta Was this translation helpful? Give feedback.
All reactions