Skip to content

Commit 9130397

Browse files
committed
resolve comments
1 parent 3ac3273 commit 9130397

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

docs-devsite/firestore_.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ https://github.com/firebase/firebase-js-sdk
2626
| [connectFirestoreEmulator(firestore, host, port, options)](./firestore_.md#connectfirestoreemulator_7c247cd) | Modify this instance to communicate with the Cloud Firestore emulator.<!-- -->Note: This must be called before this instance has been used to do any operations. |
2727
| [disableNetwork(firestore)](./firestore_.md#disablenetwork_231a8e0) | Disables network usage for this instance. It can be re-enabled via [enableNetwork()](./firestore_.md#enablenetwork_231a8e0)<!-- -->. While the network is disabled, any snapshot listeners, <code>getDoc()</code> or <code>getDocs()</code> calls will return results from cache, and any write operations will be queued until the network is restored. |
2828
| [doc(firestore, path, pathSegments)](./firestore_.md#doc_1eb4c23) | Gets a <code>DocumentReference</code> instance that refers to the document at the specified absolute path. |
29-
| [enableIndexedDbPersistence(firestore, persistenceSettings)](./firestore_.md#enableindexeddbpersistence_224174f) | Attempts to enable persistent storage, if possible.<!-- -->If fails, <code>enableMultiTabIndexedDbPersistence()</code> will reject the promise or throw an error. There are several reasons why this can fail, which can be identified by the <code>code</code> on the error.<!-- -->\* failed-precondition: The app is already open in another browser tab. \* unimplemented: The browser is incompatible with the offline persistence implementation.<!-- -->Note that even after this failure, the [Firestore](./firestore_.firestore.md#firestore_class) instance will remain usable, however offline persistence will be disabled.<!-- -->Note: <code>enableIndexedDbPersistence()</code> must be called before any other functions (other than [initializeFirestore()](./firestore_.md#initializefirestore_fc7d200)<!-- -->, [getFirestore()](./firestore_.md#getfirestore) or [clearIndexedDbPersistence()](./firestore_.md#clearindexeddbpersistence_231a8e0)<!-- -->. Failing to do so will make this throw an error.<!-- -->Persistence cannot be used in a Node.js environment. |
30-
| [enableMultiTabIndexedDbPersistence(firestore)](./firestore_.md#enablemultitabindexeddbpersistence_231a8e0) | Attempts to enable multi-tab persistent storage, if possible. If enabled across all tabs, all operations share access to local persistence, including shared execution of queries and latency-compensated local document updates across all connected instances.<!-- -->If fails, <code>enableMultiTabIndexedDbPersistence()</code> will reject the promise or throw an error. There are several reasons why this can fail, which can be identified by the <code>code</code> on the error.<!-- -->\* failed-precondition: The app is already open in another browser tab and multi-tab is not enabled. \* unimplemented: The browser is incompatible with the offline persistence implementation.<!-- -->Note that even after this failure, the [Firestore](./firestore_.firestore.md#firestore_class) instance will remain usable, however offline persistence will be disabled. |
29+
| [enableIndexedDbPersistence(firestore, persistenceSettings)](./firestore_.md#enableindexeddbpersistence_224174f) | Attempts to enable persistent storage, if possible.<!-- -->On failure, <code>enableIndexedDbPersistence()</code> will reject the promise or throw an exception. There are several reasons why this can fail, which can be identified by the <code>code</code> on the error.<!-- -->\* failed-precondition: The app is already open in another browser tab. \* unimplemented: The browser is incompatible with the offline persistence implementation.<!-- -->Note that even after a failure, the [Firestore](./firestore_.firestore.md#firestore_class) instance will remain usable, however offline persistence will be disabled.<!-- -->Note: <code>enableIndexedDbPersistence()</code> must be called before any other functions (other than [initializeFirestore()](./firestore_.md#initializefirestore_fc7d200)<!-- -->, [getFirestore()](./firestore_.md#getfirestore) or [clearIndexedDbPersistence()](./firestore_.md#clearindexeddbpersistence_231a8e0)<!-- -->.<!-- -->Persistence cannot be used in a Node.js environment. |
30+
| [enableMultiTabIndexedDbPersistence(firestore)](./firestore_.md#enablemultitabindexeddbpersistence_231a8e0) | Attempts to enable multi-tab persistent storage, if possible. If enabled across all tabs, all operations share access to local persistence, including shared execution of queries and latency-compensated local document updates across all connected instances.<!-- -->On failure, <code>enableMultiTabIndexedDbPersistence()</code> will reject the promise or throw an exception. There are several reasons why this can fail, which can be identified by the <code>code</code> on the error.<!-- -->\* failed-precondition: The app is already open in another browser tab and multi-tab is not enabled. \* unimplemented: The browser is incompatible with the offline persistence implementation.<!-- -->Note that even after a failure, the [Firestore](./firestore_.firestore.md#firestore_class) instance will remain usable, however offline persistence will be disabled. |
3131
| [enableNetwork(firestore)](./firestore_.md#enablenetwork_231a8e0) | Re-enables use of the network for this [Firestore](./firestore_.firestore.md#firestore_class) instance after a prior call to [disableNetwork()](./firestore_.md#disablenetwork_231a8e0)<!-- -->. |
3232
| [getPersistentCacheIndexManager(firestore)](./firestore_.md#getpersistentcacheindexmanager_231a8e0) | Returns the PersistentCache Index Manager used by the given <code>Firestore</code> object. The <code>PersistentCacheIndexManager</code> instance, or <code>null</code> if local persistent storage is not in use. |
3333
| [loadBundle(firestore, bundleData)](./firestore_.md#loadbundle_bec5b75) | Loads a Firestore bundle into the local cache. |
@@ -459,13 +459,13 @@ If the final path has an odd number of segments and does not point to a document
459459
460460
Attempts to enable persistent storage, if possible.
461461

462-
If fails, `enableMultiTabIndexedDbPersistence()` will reject the promise or throw an error. There are several reasons why this can fail, which can be identified by the `code` on the error.
462+
On failure, `enableIndexedDbPersistence()` will reject the promise or throw an exception. There are several reasons why this can fail, which can be identified by the `code` on the error.
463463

464464
\* failed-precondition: The app is already open in another browser tab. \* unimplemented: The browser is incompatible with the offline persistence implementation.
465465

466-
Note that even after this failure, the [Firestore](./firestore_.firestore.md#firestore_class) instance will remain usable, however offline persistence will be disabled.
466+
Note that even after a failure, the [Firestore](./firestore_.firestore.md#firestore_class) instance will remain usable, however offline persistence will be disabled.
467467

468-
Note: `enableIndexedDbPersistence()` must be called before any other functions (other than [initializeFirestore()](./firestore_.md#initializefirestore_fc7d200)<!-- -->, [getFirestore()](./firestore_.md#getfirestore) or [clearIndexedDbPersistence()](./firestore_.md#clearindexeddbpersistence_231a8e0)<!-- -->. Failing to do so will make this throw an error.
468+
Note: `enableIndexedDbPersistence()` must be called before any other functions (other than [initializeFirestore()](./firestore_.md#initializefirestore_fc7d200)<!-- -->, [getFirestore()](./firestore_.md#getfirestore) or [clearIndexedDbPersistence()](./firestore_.md#clearindexeddbpersistence_231a8e0)<!-- -->.
469469

470470
Persistence cannot be used in a Node.js environment.
471471

@@ -497,11 +497,11 @@ A `Promise` that represents successfully enabling persistent storage.
497497
498498
Attempts to enable multi-tab persistent storage, if possible. If enabled across all tabs, all operations share access to local persistence, including shared execution of queries and latency-compensated local document updates across all connected instances.
499499

500-
If fails, `enableMultiTabIndexedDbPersistence()` will reject the promise or throw an error. There are several reasons why this can fail, which can be identified by the `code` on the error.
500+
On failure, `enableMultiTabIndexedDbPersistence()` will reject the promise or throw an exception. There are several reasons why this can fail, which can be identified by the `code` on the error.
501501

502502
\* failed-precondition: The app is already open in another browser tab and multi-tab is not enabled. \* unimplemented: The browser is incompatible with the offline persistence implementation.
503503

504-
Note that even after this failure, the [Firestore](./firestore_.firestore.md#firestore_class) instance will remain usable, however offline persistence will be disabled.
504+
Note that even after a failure, the [Firestore](./firestore_.firestore.md#firestore_class) instance will remain usable, however offline persistence will be disabled.
505505

506506
<b>Signature:</b>
507507

packages/firestore/src/api/database.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -305,21 +305,20 @@ export function configureFirestore(firestore: Firestore): void {
305305
/**
306306
* Attempts to enable persistent storage, if possible.
307307
*
308-
* If fails, `enableMultiTabIndexedDbPersistence()` will reject the promise or
309-
* throw an error. There are several reasons why this can fail, which can be
308+
* On failure, `enableIndexedDbPersistence()` will reject the promise or
309+
* throw an exception. There are several reasons why this can fail, which can be
310310
* identified by the `code` on the error.
311311
*
312312
* * failed-precondition: The app is already open in another browser tab.
313313
* * unimplemented: The browser is incompatible with the offline persistence
314314
* implementation.
315315
*
316-
* Note that even after this failure, the {@link Firestore} instance will remain
316+
* Note that even after a failure, the {@link Firestore} instance will remain
317317
* usable, however offline persistence will be disabled.
318318
*
319319
* Note: `enableIndexedDbPersistence()` must be called before any other functions
320320
* (other than {@link initializeFirestore}, {@link (getFirestore:1)} or
321-
* {@link clearIndexedDbPersistence}. Failing to do so will make this
322-
* throw an error.
321+
* {@link clearIndexedDbPersistence}.
323322
*
324323
* Persistence cannot be used in a Node.js environment.
325324
*
@@ -372,16 +371,16 @@ export function enableIndexedDbPersistence(
372371
* shared execution of queries and latency-compensated local document updates
373372
* across all connected instances.
374373
*
375-
* If fails, `enableMultiTabIndexedDbPersistence()` will reject the promise or
376-
* throw an error. There are several reasons why this can fail, which can be
374+
* On failure, `enableMultiTabIndexedDbPersistence()` will reject the promise or
375+
* throw an exception. There are several reasons why this can fail, which can be
377376
* identified by the `code` on the error.
378377
*
379378
* * failed-precondition: The app is already open in another browser tab and
380379
* multi-tab is not enabled.
381380
* * unimplemented: The browser is incompatible with the offline persistence
382381
* implementation.
383382
*
384-
* Note that even after this failure, the {@link Firestore} instance will remain
383+
* Note that even after a failure, the {@link Firestore} instance will remain
385384
* usable, however offline persistence will be disabled.
386385
*
387386
* @param firestore - The {@link Firestore} instance to enable persistence for.

0 commit comments

Comments
 (0)