-
Notifications
You must be signed in to change notification settings - Fork 948
Comment out multi-tab flag #1039
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -769,6 +769,27 @@ declare namespace firebase.firestore { | |
timestampsInSnapshots?: boolean; | ||
} | ||
|
||
// TODO(multitab): Uncomment when multi-tab is released publicly. | ||
// /** | ||
// * Settings that can be passed to Firestore.enablePersistence() to configure | ||
// * Firestore persistence. | ||
// */ | ||
// export interface PersistenceSettings { | ||
// /** | ||
// * Whether to synchronize the in-memory state of multiple tabs. Setting this | ||
// * to 'true' in all open tabs enables shared access to local persistence, | ||
// * shared execution of queries and latency-compensated local document updates | ||
// * across all connected instances. | ||
// * | ||
// * To enable this mode, `experimentalTabSynchronization:true` needs to be set | ||
// * globally in all active tabs. If omitted or set to 'false', | ||
// * `enablePersistence()` will fail in all but the first tab. | ||
// * | ||
// * NOTE: This mode is not yet recommended for production use. | ||
// */ | ||
// experimentalTabSynchronization?: boolean; | ||
// } | ||
|
||
export type LogLevel = 'debug' | 'error' | 'silent'; | ||
|
||
export function setLogLevel(logLevel: LogLevel): void; | ||
|
@@ -808,6 +829,29 @@ declare namespace firebase.firestore { | |
*/ | ||
enablePersistence(): Promise<void>; | ||
|
||
// TODO(multitab): Uncomment when multi-tab is released publicly. | ||
// /** | ||
// * Attempts to enable persistent storage, if possible. | ||
// * | ||
// * Must be called before any other methods (other than settings()). | ||
// * | ||
// * If this fails, enablePersistence() will reject the promise it returns. | ||
// * Note that even after this failure, the firestore instance will remain | ||
// * usable, however offline persistence will be disabled. | ||
// * | ||
// * There are several reasons why this can fail, which can be identified by | ||
// * the `code` on the error. | ||
// * | ||
// * * failed-precondition: The app is already open in another browser tab. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Technically this should probably have some mention of experimentalTabSynchronization... but since it's experimental maybe we don't care to give it too much verbiage in this method description... |
||
// * * unimplemented: The browser is incompatible with the offline | ||
// * persistence implementation. | ||
// * | ||
// * @param settings Optional settings object to configure persistence. | ||
// * @return A promise that represents successfully enabling persistent | ||
// * storage. | ||
// */ | ||
// enablePersistence(settings?: PersistenceSettings): Promise<void>; | ||
|
||
/** | ||
* Gets a `CollectionReference` instance that refers to the collection at | ||
* the specified path. | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I assume we'll do the right thing, but really this should be "Uncomment (and remove above version) when. .."
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.
I'll take care of that when the day comes :)