Skip to content

Commit 80d19e2

Browse files
API Extractor Doc fixes (#4105)
1 parent 3045a0e commit 80d19e2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+640
-606
lines changed

packages/firestore/exp/src/api/database.ts

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export class FirebaseFirestore
7777

7878
_firestoreClient: FirestoreClient | undefined;
7979

80+
/** @hideconstructor */
8081
constructor(
8182
databaseIdOrApp: DatabaseId | FirebaseApp,
8283
authProvider: Provider<FirebaseAuthInternalName>
@@ -99,13 +100,13 @@ export class FirebaseFirestore
99100
/**
100101
* Initializes a new instance of Cloud Firestore with the provided settings.
101102
* Can only be called before any other function, including
102-
* {@link getFirestore()}. If the custom settings are empty, this function is
103-
* equivalent to calling {@link getFirestore()}.
103+
* {@link getFirestore}. If the custom settings are empty, this function is
104+
* equivalent to calling {@link getFirestore}.
104105
*
105-
* @param app The {@link FirebaseApp} with which the `Firestore` instance will
106+
* @param app - The {@link FirebaseApp} with which the `Firestore` instance will
106107
* be associated.
107-
* @param settings A settings object to configure the `Firestore` instance.
108-
* @return A newly initialized `Firestore` instance.
108+
* @param settings - A settings object to configure the `Firestore` instance.
109+
* @returns A newly initialized `Firestore` instance.
109110
*/
110111
export function initializeFirestore(
111112
app: FirebaseApp,
@@ -136,9 +137,9 @@ export function initializeFirestore(
136137
* provided {@link FirebaseApp}. If no instance exists, initializes a new
137138
* instance with default settings.
138139
*
139-
* @param app The {@link FirebaseApp} instance that the returned Firestore
140+
* @param app - The {@link FirebaseApp} instance that the returned Firestore
140141
* instance is associated with.
141-
* @return The `Firestore` instance of the provided app.
142+
* @returns The `Firestore` instance of the provided app.
142143
*/
143144
export function getFirestore(app: FirebaseApp): FirebaseFirestore {
144145
return _getProvider(app, 'firestore-exp').getImmediate() as FirebaseFirestore;
@@ -148,8 +149,8 @@ export function getFirestore(app: FirebaseApp): FirebaseFirestore {
148149
* Attempts to enable persistent storage, if possible.
149150
*
150151
* Must be called before any other functions (other than
151-
* {@link initializeFirestore()}, {@link getFirestore()} or
152-
* {@link clearIndexedDbPersistence()}.
152+
* {@link initializeFirestore}, {@link getFirestore} or
153+
* {@link clearIndexedDbPersistence}.
153154
*
154155
* If this fails, `enableIndexedDbPersistence()` will reject the promise it
155156
* returns. Note that even after this failure, the `Firestore` instance will
@@ -162,9 +163,10 @@ export function getFirestore(app: FirebaseApp): FirebaseFirestore {
162163
* * unimplemented: The browser is incompatible with the offline
163164
* persistence implementation.
164165
*
165-
* @param firestore The `Firestore` instance to enable persistence for.
166-
* @param persistenceSettings Optional settings object to configure persistence.
167-
* @return A promise that represents successfully enabling persistent storage.
166+
* @param firestore - The `Firestore` instance to enable persistence for.
167+
* @param persistenceSettings - Optional settings object to configure
168+
* persistence.
169+
* @returns A promise that represents successfully enabling persistent storage.
168170
*/
169171
export function enableIndexedDbPersistence(
170172
firestore: FirebaseFirestore,
@@ -207,8 +209,8 @@ export function enableIndexedDbPersistence(
207209
* * unimplemented: The browser is incompatible with the offline
208210
* persistence implementation.
209211
*
210-
* @param firestore The `Firestore` instance to enable persistence for.
211-
* @return A promise that represents successfully enabling persistent
212+
* @param firestore - The `Firestore` instance to enable persistence for.
213+
* @returns A promise that represents successfully enabling persistent
212214
* storage.
213215
*/
214216
export function enableMultiTabIndexedDbPersistence(
@@ -310,7 +312,7 @@ function canFallbackFromIndexedDbError(
310312
* Must be called while the `Firestore` instance is not started (after the app is
311313
* terminated or when the app is first initialized). On startup, this function
312314
* must be called before other functions (other than {@link
313-
* initializeFirestore()} or {@link getFirestore()})). If the `Firestore`
315+
* initializeFirestore} or {@link getFirestore})). If the `Firestore`
314316
* instance is still running, the promise will be rejected with the error code
315317
* of `failed-precondition`.
316318
*
@@ -321,8 +323,8 @@ function canFallbackFromIndexedDbError(
321323
* to the disclosure of cached data in between user sessions, we strongly
322324
* recommend not enabling persistence at all.
323325
*
324-
* @param firestore The `Firestore` instance to clear persistence for.
325-
* @return A promise that is resolved when the persistent storage is
326+
* @param firestore - The `Firestore` instance to clear persistence for.
327+
* @returns A promise that is resolved when the persistent storage is
326328
* cleared. Otherwise, the promise is rejected with an error.
327329
*/
328330
export function clearIndexedDbPersistence(
@@ -363,7 +365,7 @@ export function clearIndexedDbPersistence(
363365
* Any outstanding `waitForPendingWrites()` Promises are rejected during user
364366
* changes.
365367
*
366-
* @return A Promise which resolves when all currently pending writes have been
368+
* @returns A Promise which resolves when all currently pending writes have been
367369
* acknowledged by the backend.
368370
*/
369371
export function waitForPendingWrites(
@@ -376,9 +378,9 @@ export function waitForPendingWrites(
376378

377379
/**
378380
* Re-enables use of the network for this Firestore instance after a prior
379-
* call to {@link disableNetwork()}.
381+
* call to {@link disableNetwork}.
380382
*
381-
* @return A promise that is resolved once the network has been enabled.
383+
* @returns A promise that is resolved once the network has been enabled.
382384
*/
383385
export function enableNetwork(firestore: FirebaseFirestore): Promise<void> {
384386
firestore = cast(firestore, FirebaseFirestore);
@@ -388,11 +390,11 @@ export function enableNetwork(firestore: FirebaseFirestore): Promise<void> {
388390

389391
/**
390392
* Disables network usage for this instance. It can be re-enabled via {@link
391-
* enableNetwork()}. While the network is disabled, any snapshot listeners,
393+
* enableNetwork}. While the network is disabled, any snapshot listeners,
392394
* `getDoc()` or `getDocs()` calls will return results from cache, and any write
393395
* operations will be queued until the network is restored.
394396
*
395-
* @return A promise that is resolved once the network has been disabled.
397+
* @returns A promise that is resolved once the network has been disabled.
396398
*/
397399
export function disableNetwork(firestore: FirebaseFirestore): Promise<void> {
398400
firestore = cast(firestore, FirebaseFirestore);
@@ -407,7 +409,7 @@ export function disableNetwork(firestore: FirebaseFirestore): Promise<void> {
407409
* may be used. Any other function will throw a `FirestoreError`.
408410
*
409411
* To restart after termination, create a new instance of FirebaseFirestore with
410-
* {@link getFirestore()}.
412+
* {@link getFirestore}.
411413
*
412414
* Termination does not cancel any pending writes, and any promises that are
413415
* awaiting a response from the server will not be resolved. If you have
@@ -419,7 +421,7 @@ export function disableNetwork(firestore: FirebaseFirestore): Promise<void> {
419421
* of its resources or in combination with `clearIndexedDbPersistence()` to
420422
* ensure that all local state is destroyed between test runs.
421423
*
422-
* @return A promise that is resolved when the instance has been successfully
424+
* @returns A promise that is resolved when the instance has been successfully
423425
* terminated.
424426
*/
425427
export function terminate(firestore: FirebaseFirestore): Promise<void> {

0 commit comments

Comments
 (0)