Skip to content

Commit a594155

Browse files
committed
Clarify documentation
1 parent ca809e0 commit a594155

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

common/api-review/firestore.api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,15 +299,15 @@ export function getDocsFromCache<AppModelType, DbModelType extends DocumentData>
299299
// @public
300300
export function getDocsFromServer<AppModelType, DbModelType extends DocumentData>(query: Query<AppModelType, DbModelType>): Promise<QuerySnapshot<AppModelType, DbModelType>>;
301301

302+
// @public
303+
export function getFirestore(): Firestore;
304+
302305
// @public
303306
export function getFirestore(app: FirebaseApp): Firestore;
304307

305308
// @beta
306309
export function getFirestore(databaseId: string): Firestore;
307310

308-
// @public
309-
export function getFirestore(): Firestore;
310-
311311
// @beta
312312
export function getFirestore(app: FirebaseApp, databaseId: string): Firestore;
313313

docs-devsite/firestore_.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ https://github.com/firebase/firebase-js-sdk
1717
| --- | --- |
1818
| <b>function(app...)</b> |
1919
| [getFirestore(app)](./firestore_.md#getfirestore) | Returns the existing default [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the provided [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!-- -->. If no instance exists, initializes a new instance with default settings. |
20-
| [getFirestore(app, databaseId)](./firestore_.md#getfirestore) | <b><i>(BETA)</i></b> Returns the existing default [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the provided [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!-- -->. If no instance exists, initializes a new instance with default settings. |
20+
| [getFirestore(app, databaseId)](./firestore_.md#getfirestore) | <b><i>(BETA)</i></b> Returns the existing named [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the provided [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!-- -->. If no instance exists, initializes a new instance with default settings. |
2121
| [initializeFirestore(app, settings, databaseId)](./firestore_.md#initializefirestore) | Initializes a new instance of [Firestore](./firestore_.firestore.md#firestore_class) with the provided settings. Can only be called before any other function, including [getFirestore()](./firestore_.md#getfirestore)<!-- -->. If the custom settings are empty, this function is equivalent to calling [getFirestore()](./firestore_.md#getfirestore)<!-- -->. |
2222
| <b>function(firestore...)</b> |
2323
| [clearIndexedDbPersistence(firestore)](./firestore_.md#clearindexeddbpersistence) | Clears the persistent storage. This includes pending writes and cached documents.<!-- -->Must be called while the [Firestore](./firestore_.firestore.md#firestore_class) instance is not started (after the app is terminated or when the app is first initialized). On startup, this function must be called before other functions (other than [initializeFirestore()](./firestore_.md#initializefirestore) or [getFirestore()](./firestore_.md#getfirestore)<!-- -->)). If the [Firestore](./firestore_.firestore.md#firestore_class) instance is still running, the promise will be rejected with the error code of <code>failed-precondition</code>.<!-- -->Note: <code>clearIndexedDbPersistence()</code> is primarily intended to help write reliable tests that use Cloud Firestore. It uses an efficient mechanism for dropping existing data but does not attempt to securely overwrite or otherwise make cached data unrecoverable. For applications that are sensitive to the disclosure of cached data in between user sessions, we strongly recommend not enabling persistence at all. |
@@ -49,7 +49,7 @@ https://github.com/firebase/firebase-js-sdk
4949
| [persistentMultipleTabManager()](./firestore_.md#persistentmultipletabmanager) | Creates an instance of <code>PersistentMultipleTabManager</code>. |
5050
| [serverTimestamp()](./firestore_.md#servertimestamp) | Returns a sentinel used with [setDoc()](./firestore_lite.md#setdoc) or [updateDoc()](./firestore_lite.md#updatedoc) to include a server-generated timestamp in the written data. |
5151
| <b>function(databaseId...)</b> |
52-
| [getFirestore(databaseId)](./firestore_.md#getfirestore) | <b><i>(BETA)</i></b> Returns the existing [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the default [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!-- -->. If no instance exists, initializes a new instance with default settings. |
52+
| [getFirestore(databaseId)](./firestore_.md#getfirestore) | <b><i>(BETA)</i></b> Returns the existing named [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the default [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!-- -->. If no instance exists, initializes a new instance with default settings. |
5353
| <b>function(elements...)</b> |
5454
| [arrayRemove(elements)](./firestore_.md#arrayremove) | Returns a special value that can be used with [setDoc()](./firestore_.md#setdoc) or that tells the server to remove the given elements from any array value that already exists on the server. All instances of each element specified will be removed from the array. If the field being modified is not already an array it will be overwritten with an empty array. |
5555
| [arrayUnion(elements)](./firestore_.md#arrayunion) | Returns a special value that can be used with [setDoc()](./firestore_lite.md#setdoc) or [updateDoc()](./firestore_lite.md#updatedoc) that tells the server to union the given elements with any array value that already exists on the server. Each specified element that doesn't already exist in the array will be added to the end. If the field being modified is not already an array it will be overwritten with an array containing exactly the specified elements. |
@@ -240,14 +240,14 @@ export declare function getFirestore(app: FirebaseApp): Firestore;
240240

241241
[Firestore](./firestore_.firestore.md#firestore_class)
242242

243-
The [Firestore](./firestore_.firestore.md#firestore_class) instance of the provided app.
243+
The default [Firestore](./firestore_.firestore.md#firestore_class) instance of the provided app.
244244

245245
## getFirestore()
246246

247247
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
248248
>
249249
250-
Returns the existing default [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the provided [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!-- -->. If no instance exists, initializes a new instance with default settings.
250+
Returns the existing named [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the provided [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!-- -->. If no instance exists, initializes a new instance with default settings.
251251

252252
<b>Signature:</b>
253253

@@ -266,7 +266,7 @@ export declare function getFirestore(app: FirebaseApp, databaseId: string): Fire
266266

267267
[Firestore](./firestore_.firestore.md#firestore_class)
268268

269-
The [Firestore](./firestore_.firestore.md#firestore_class) instance of the provided app.
269+
The named [Firestore](./firestore_.firestore.md#firestore_class) instance of the provided app.
270270

271271
## initializeFirestore()
272272

@@ -901,7 +901,7 @@ export declare function getFirestore(): Firestore;
901901

902902
[Firestore](./firestore_.firestore.md#firestore_class)
903903

904-
The [Firestore](./firestore_.firestore.md#firestore_class) instance of the provided app.
904+
The default [Firestore](./firestore_.firestore.md#firestore_class) instance of the default app.
905905

906906
## memoryEagerGarbageCollector()
907907

@@ -947,7 +947,7 @@ export declare function serverTimestamp(): FieldValue;
947947
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
948948
>
949949
950-
Returns the existing [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the default [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!-- -->. If no instance exists, initializes a new instance with default settings.
950+
Returns the existing named [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the default [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!-- -->. If no instance exists, initializes a new instance with default settings.
951951

952952
<b>Signature:</b>
953953

@@ -965,7 +965,7 @@ export declare function getFirestore(databaseId: string): Firestore;
965965

966966
[Firestore](./firestore_.firestore.md#firestore_class)
967967

968-
The [Firestore](./firestore_.firestore.md#firestore_class) instance of the provided app.
968+
The named [Firestore](./firestore_.firestore.md#firestore_class) instance of the default app.
969969

970970
## arrayRemove()
971971

0 commit comments

Comments
 (0)