@@ -130,6 +130,26 @@ export class Firestore extends LiteFirestore {
130
130
}
131
131
}
132
132
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
+
133
153
/**
134
154
* Initializes a new instance of {@link Firestore} with the provided settings.
135
155
* Can only be called before any other function, including
@@ -142,6 +162,11 @@ export class Firestore extends LiteFirestore {
142
162
* @param databaseId - The name of the database.
143
163
* @returns A newly initialized {@link Firestore} instance.
144
164
*/
165
+ export function initializeFirestore (
166
+ app : FirebaseApp ,
167
+ settings : FirestoreSettings ,
168
+ databaseId : string
169
+ ) : Firestore ;
145
170
export function initializeFirestore (
146
171
app : FirebaseApp ,
147
172
settings : FirestoreSettings ,
@@ -206,6 +231,11 @@ export function initializeFirestore(
206
231
* instance with default settings.
207
232
*
208
233
* @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}.
209
239
*/
210
240
export function getFirestore ( ) : Firestore ;
211
241
/**
@@ -216,6 +246,11 @@ export function getFirestore(): Firestore;
216
246
* @param app - The {@link @firebase/app#FirebaseApp } instance that the returned {@link Firestore}
217
247
* instance is associated with.
218
248
* @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}.
219
254
*/
220
255
export function getFirestore ( app : FirebaseApp ) : Firestore ;
221
256
/**
@@ -225,7 +260,6 @@ export function getFirestore(app: FirebaseApp): Firestore;
225
260
*
226
261
* @param databaseId - The name of the database.
227
262
* @returns The named {@link Firestore} instance of the default app.
228
- * @beta
229
263
*/
230
264
export function getFirestore ( databaseId : string ) : Firestore ;
231
265
/**
@@ -237,7 +271,6 @@ export function getFirestore(databaseId: string): Firestore;
237
271
* instance is associated with.
238
272
* @param databaseId - The name of the database.
239
273
* @returns The named {@link Firestore} instance of the provided app.
240
- * @beta
241
274
*/
242
275
export function getFirestore ( app : FirebaseApp , databaseId : string ) : Firestore ;
243
276
export function getFirestore (
0 commit comments