Skip to content

Commit eebb68b

Browse files
committed
Addressing more nits.
1 parent 1456277 commit eebb68b

File tree

1 file changed

+19
-21
lines changed

1 file changed

+19
-21
lines changed

packages/firebase/index.d.ts

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
* limitations under the License.
1616
*/
1717

18-
import { DocumentData, LoadBundleTask, Query } from '@firebase/firestore-types';
19-
2018
/**
2119
* <code>firebase</code> is a global namespace from which all Firebase
2220
* services are accessed.
@@ -8295,23 +8293,23 @@ declare namespace firebase.firestore {
82958293
* Loads a Firestore bundle into the local cache.
82968294
*
82978295
* @param bundleData
8298-
* An object representing the bundle to be load, could be a `ArrayBuffer`,
8299-
* a `ReadableStream<Uint8Array>` or a `string`.
8296+
* An object representing the bundle to be load. Valid objects are `ArrayBuffer`,
8297+
* `ReadableStream<Uint8Array>` or `string`.
83008298
*
83018299
* @return
8302-
* A `LoadBundleTask` object, which notifies callers with progress update, completion
8303-
* or error event. It can be used as a `Promise<LoadBundleTaskProgress>`.
8300+
* A `LoadBundleTask` object, which notifies callers with progress update, and completion
8301+
* or error events. It can be used as a `Promise<LoadBundleTaskProgress>`.
83048302
*/
83058303
loadBundle(
83068304
bundleData: ArrayBuffer | ReadableStream<Uint8Array> | string
83078305
): LoadBundleTask;
83088306

83098307
/**
8310-
* Reads a Firestore query from local cache that is associated to a given name.
8308+
* Reads a Firestore `Query` from local cache that is associated to a given name.
83118309
*
8312-
* The named queries are from bundles, and saved as a result of `loadBundle`. `namedQuery`
8313-
* retrieves the queries used to built the bundles, saving the need to manually construct
8314-
* those queries.
8310+
* The named queries are from bundles. They are packaged into bundles on the server side (along
8311+
* with resulting documents), and loaded to local cache using `loadBundle`. Once in local
8312+
* cache, use this method to extract a `Query` by name.
83158313
*/
83168314
namedQuery(name: string): Promise<Query<DocumentData> | null>;
83178315

@@ -8322,20 +8320,20 @@ declare namespace firebase.firestore {
83228320
}
83238321

83248322
/**
8325-
* Represents the task of loading a Firestore bundle. It provides progress of the bundle
8326-
* loading, task completion and error events should they be any.
8323+
* Represents the task of loading a Firestore bundle. It provides progress of bundle
8324+
* loading, as well as task completion and error events.
83278325
*
83288326
* The API is compatible with `Promise<LoadBundleTaskProgress>`.
83298327
*/
83308328
export interface LoadBundleTask extends PromiseLike<LoadBundleTaskProgress> {
83318329
/**
8332-
* Registers functions to listen to bundle loading progresses.
8330+
* Registers functions to listen to bundle loading progress events.
83338331
* @param next
8334-
* Called there is a progress update from bundle loading, typically whenever
8335-
* a Firestore document is loaded it will generate a progress update.
8332+
* Called when there is a progress update from bundle loading, typically `next` calls occur
8333+
* each time a Firestore document is loaded from the bundle.
83368334
* @param error
8337-
* Called when there is an error occurred from loading the bundle. The task
8338-
* aborts after reporting the error, and there should be no more updates after this.
8335+
* Called when an error occurs during bundle loading. The task aborts after reporting the
8336+
* error, and there should be no more updates after this.
83398337
* @param complete
83408338
* Called when the loading task is complete.
83418339
*/
@@ -8349,10 +8347,10 @@ declare namespace firebase.firestore {
83498347
* Implements the `Promise<LoadBundleTaskProgress>.then` interface.
83508348
*
83518349
* @param onFulfilled
8352-
* It is called with the compeltion `LoadBundleTaskProgress` when the
8353-
* loading task completes.
8350+
* Called on the completion with a `LoadBundleTaskProgress` update when the
8351+
* loading task completes. The update will have its `taskState` set to `"Success"`.
83548352
* @param onRejected
8355-
* It is called when there is an error occurred from loading the bundle.
8353+
* Called when an error occurs during bundle loading.
83568354
*/
83578355
then<T, R>(
83588356
onFulfilled?: (a: LoadBundleTaskProgress) => T | PromiseLike<T>,
@@ -8363,7 +8361,7 @@ declare namespace firebase.firestore {
83638361
* Implements the `Promise<LoadBundleTaskProgress>.catch` interface.
83648362
*
83658363
* @param onRejected
8366-
* It is called when there is an error occurred from loading the bundle.
8364+
* Called when an error occurs during bundle loading.
83678365
*/
83688366
catch<R>(
83698367
onRejected: (a: Error) => R | PromiseLike<R>

0 commit comments

Comments
 (0)