@@ -75,58 +75,72 @@ export {
75
75
export { FirestoreSettings } ;
76
76
77
77
/**
78
- * Gets the {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
78
+ * Gets the default {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
79
79
* service for the default app.
80
80
*
81
- * `getFirestore()` can be called with no arguments to access the default
82
- * app's `Firestore` service or as `getFirestore(app)` to access the
83
- * `Firestore` service associated with a specific app.
84
- *
85
81
* @example
86
82
* ```javascript
87
- * // Get the Firestore service for the default app
83
+ * // Get the default Firestore service for the default app
88
84
* const defaultFirestore = getFirestore();
89
85
* ```
90
86
91
87
* @returns The default {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
92
- * service if no app is provided or the `Firestore` service associated with the
93
- * provided app.
88
+ * service for the default app.
94
89
*/
95
90
export function getFirestore ( ) : Firestore ;
96
91
97
92
/**
98
- * Gets the {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
93
+ * Gets the default {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
99
94
* service for the given app.
100
95
*
101
- * `getFirestore()` can be called with no arguments to access the default
102
- * app's `Firestore` service or as `getFirestore(app)` to access the
103
- * `Firestore` service associated with a specific app.
104
- *
105
96
* @example
106
97
* ```javascript
107
- * // Get the Firestore service for a specific app
98
+ * // Get the default Firestore service for a specific app
108
99
* const otherFirestore = getFirestore(app);
109
100
* ```
110
101
*
111
- * @param App - which `Firestore` service to
112
- * return. If not provided, the default `Firestore` service will be returned.
102
+ * @param app - which `Firestore` service to return.
113
103
*
114
104
* @returns The default {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
115
- * service if no app is provided or the `Firestore` service associated with the
116
- * provided app.
105
+ * service associated with the provided app.
117
106
*/
118
107
export function getFirestore ( app : App ) : Firestore ;
119
108
120
109
/**
121
- * @param databaseId
122
- * @internal
110
+ * Gets the named {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
111
+ * service for the default app.
112
+ *
113
+ * @example
114
+ * ```javascript
115
+ * // Get the Firestore service for a named database and default app
116
+ * const otherFirestore = getFirestore('otherDb');
117
+ * ```
118
+ *
119
+ * @param databaseId - name of database to return.
120
+ *
121
+ * @returns The named {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
122
+ * service for the default app.
123
+ * @beta
123
124
*/
124
125
export function getFirestore ( databaseId : string ) : Firestore ;
125
126
126
127
/**
127
- * @param app
128
- * @param databaseId
129
- * @internal
128
+ * Gets the named {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
129
+ * service for the given app.
130
+ *
131
+ * @example
132
+ * ```javascript
133
+ * // Get the Firestore service for a named database and specific app.
134
+ * const otherFirestore = getFirestore('otherDb');
135
+ * ```
136
+ *
137
+ * @param app - which `Firestore` service to return.
138
+ *
139
+ * @param databaseId - name of database to return.
140
+ *
141
+ * @returns The named {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
142
+ * service associated with the provided app.
143
+ * @beta
130
144
*/
131
145
export function getFirestore ( app : App , databaseId : string ) : Firestore ;
132
146
@@ -144,7 +158,7 @@ export function getFirestore(
144
158
}
145
159
146
160
/**
147
- * Gets the {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
161
+ * Gets the default {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
148
162
* service for the given app, passing extra parameters to its constructor.
149
163
*
150
164
* @example
@@ -153,20 +167,32 @@ export function getFirestore(
153
167
* const otherFirestore = initializeFirestore(app, {preferRest: true});
154
168
* ```
155
169
*
156
- * @param App - which `Firestore` service to
157
- * return. If not provided, the default `Firestore` service will be returned.
158
- *
170
+ * @param app - which `Firestore` service to return.
171
+ *
159
172
* @param settings - Settings object to be passed to the constructor.
160
173
*
161
- * @returns The `Firestore` service associated with the provided app and settings.
174
+ * @returns The default `Firestore` service associated with the provided app and settings.
162
175
*/
163
176
export function initializeFirestore ( app : App , settings ?: FirestoreSettings ) : Firestore ;
164
177
165
178
/**
166
- * @param app
167
- * @param settings
168
- * @param databaseId
169
- * @internal
179
+ * Gets the named {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
180
+ * service for the given app, passing extra parameters to its constructor.
181
+ *
182
+ * @example
183
+ * ```javascript
184
+ * // Get the Firestore service for a specific app, require HTTP/1.1 REST transport
185
+ * const otherFirestore = initializeFirestore(app, {preferRest: true}, 'otherDb');
186
+ * ```
187
+ *
188
+ * @param app - which `Firestore` service to return.
189
+ *
190
+ * @param settings - Settings object to be passed to the constructor.
191
+ *
192
+ * @param databaseId - name of database to return.
193
+ *
194
+ * @returns The named `Firestore` service associated with the provided app and settings.
195
+ * @beta
170
196
*/
171
197
export function initializeFirestore (
172
198
app : App ,
0 commit comments