voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
28 lines (16 loc) • 1.19 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/firestore](./firestore.md) > [/](./firestore_.md) > [loadBundle](./firestore_.loadbundle.md)
## loadBundle() function
Loads a Firestore bundle into the local cache.
<b>Signature:</b>
```typescript
export declare function loadBundle(firestore: FirebaseFirestore, bundleData: ReadableStream<Uint8Array> | ArrayBuffer | string): LoadBundleTask;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| firestore | [FirebaseFirestore](./firestore_.firebasefirestore.md) | The <code>Firestore</code> instance to load bundles for for. |
| bundleData | ReadableStream<Uint8Array> \| ArrayBuffer \| string | An object representing the bundle to be loaded. Valid objects are <code>ArrayBuffer</code>, <code>ReadableStream<Uint8Array></code> or <code>string</code>. |
<b>Returns:</b>
[LoadBundleTask](./firestore_.loadbundletask.md)
A `LoadBundleTask` object, which notifies callers with progress updates, and completion or error events. It can be used as a `Promise<LoadBundleTaskProgress>`<!-- -->.