@@ -130,6 +130,26 @@ export class Firestore extends LiteFirestore {
130130 }
131131}
132132
133+ /**
134+ * Initializes a new instance of {@link Firestore} with the provided settings.
135+ * Can only be called before any other function, including
136+ * {@link (getFirestore:1)}. If the custom settings are empty, this function is
137+ * equivalent to calling {@link (getFirestore:1)}.
138+ *
139+ * @param app - The {@link @firebase/app#FirebaseApp } with which the {@link Firestore} instance will
140+ * be associated.
141+ * @param settings - A settings object to configure the {@link Firestore} instance.
142+ * @returns A newly initialized {@link Firestore} instance.
143+ * @deprecated This function assumes the database name is `(default)`. For new
144+ * databases, the database name is specified during creation, and can no longer
145+ * be assumed to be '(default)' by the SDK. Please use the function overload
146+ * that accepts `databaseId`, {@link initializeFirestore:2}.
147+ */
148+ export function initializeFirestore (
149+ app : FirebaseApp ,
150+ settings : FirestoreSettings
151+ ) : Firestore ;
152+
133153/**
134154 * Initializes a new instance of {@link Firestore} with the provided settings.
135155 * Can only be called before any other function, including
@@ -142,6 +162,11 @@ export class Firestore extends LiteFirestore {
142162 * @param databaseId - The name of the database.
143163 * @returns A newly initialized {@link Firestore} instance.
144164 */
165+ export function initializeFirestore (
166+ app : FirebaseApp ,
167+ settings : FirestoreSettings ,
168+ databaseId : string
169+ ) : Firestore ;
145170export function initializeFirestore (
146171 app : FirebaseApp ,
147172 settings : FirestoreSettings ,
@@ -206,6 +231,11 @@ export function initializeFirestore(
206231 * instance with default settings.
207232 *
208233 * @returns The default {@link Firestore} instance of the default app.
234+ *
235+ * @deprecated This function assumes the database name is `(default)`. For new
236+ * databases, the database name is specified during creation, and can no longer
237+ * be assumed to be '(default)' by the SDK. Please use the function overload
238+ * that accepts `databaseId`, {@link getFirestore:3}.
209239 */
210240export function getFirestore ( ) : Firestore ;
211241/**
@@ -216,6 +246,11 @@ export function getFirestore(): Firestore;
216246 * @param app - The {@link @firebase/app#FirebaseApp } instance that the returned {@link Firestore}
217247 * instance is associated with.
218248 * @returns The default {@link Firestore} instance of the provided app.
249+ *
250+ * @deprecated This function assumes the database name is `(default)`. For new
251+ * databases, the database name is specified during creation, and can no longer
252+ * be assumed to be '(default)' by the SDK. Please use the function overload
253+ * that accepts `databaseId`, {@link getFirestore:4}.
219254 */
220255export function getFirestore ( app : FirebaseApp ) : Firestore ;
221256/**
@@ -225,7 +260,6 @@ export function getFirestore(app: FirebaseApp): Firestore;
225260 *
226261 * @param databaseId - The name of the database.
227262 * @returns The named {@link Firestore} instance of the default app.
228- * @beta
229263 */
230264export function getFirestore ( databaseId : string ) : Firestore ;
231265/**
@@ -237,7 +271,6 @@ export function getFirestore(databaseId: string): Firestore;
237271 * instance is associated with.
238272 * @param databaseId - The name of the database.
239273 * @returns The named {@link Firestore} instance of the provided app.
240- * @beta
241274 */
242275export function getFirestore ( app : FirebaseApp , databaseId : string ) : Firestore ;
243276export function getFirestore (
0 commit comments