voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
28 lines (16 loc) • 1.24 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/firestore](./firestore.md) > [lite](./firestore_lite.md) > [initializeFirestore](./firestore_lite.initializefirestore.md)
## initializeFirestore() function
Initializes a new instance of Cloud Firestore with the provided settings. Can only be called before any other functions, including [getFirestore()](./firestore_.getfirestore.md)<!-- -->. If the custom settings are empty, this function is equivalent to calling [getFirestore()](./firestore_.getfirestore.md)<!-- -->.
<b>Signature:</b>
```typescript
export declare function initializeFirestore(app: FirebaseApp, settings: Settings): FirebaseFirestore;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| app | [FirebaseApp](./app.firebaseapp.md) | The [FirebaseApp](./app.firebaseapp.md) with which the <code>Firestore</code> instance will be associated. |
| settings | [Settings](./firestore_lite.settings.md) | A settings object to configure the <code>Firestore</code> instance. |
<b>Returns:</b>
[FirebaseFirestore](./firestore_lite.firebasefirestore.md)
A newly initialized Firestore instance.