-
Notifications
You must be signed in to change notification settings - Fork 944
Add clearPersistence(), separate functionality out from shutdown() #1712
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some drive-by comments, but looks good :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also removed boolean flags from shutdown()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the help sebastian :)
packages/firestore-types/index.d.ts
Outdated
@@ -216,6 +216,13 @@ export class FirebaseFirestore { | |||
*/ | |||
app: any; | |||
|
|||
/** | |||
* Clears the persistence cache. This can only be called when the client is not running. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few thoughts on this comment:
- In the
enablePersistence
comment above we say we "enable persistent storage". Let's describe this comparably. - We should also define "not running" concretely: see how
enablePersistence
defines the before state, but also after deleting the app. - We also need to adjust the comment for enablePersistence(), since
clearPersistence
is allowed. - You should indicate that we'll throw an exception if the client is still running
- You should indicate under which conditions the promise can be rejected.
(And again, all in a separate PR.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved @wilhuff comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
A few final nits. Make sure Travis is green before merging.
Good to go! |
No description provided.