<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@firebase/firestore](./firestore.md) &gt; [/](./firestore_.md) &gt; [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&lt;Uint8Array&gt; \| ArrayBuffer \| string | An object representing the bundle to be loaded. Valid objects are <code>ArrayBuffer</code>, <code>ReadableStream&lt;Uint8Array&gt;</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>`<!-- -->.

