Skip to content

Commit 0d463b8

Browse files
committed
Capitalize and literalize Promise
1 parent 9cc9b97 commit 0d463b8

File tree

16 files changed

+49
-49
lines changed

16 files changed

+49
-49
lines changed

packages-exp/auth-exp/src/core/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export {
5050
*
5151
* @param auth - The {@link Auth} instance.
5252
* @param persistence - The {@link Persistence} to use.
53-
* @returns A promise that resolves once the persistence change has completed
53+
* @returns A `Promise` that resolves once the persistence change has completed
5454
*
5555
* @public
5656
*/

packages-exp/auth-exp/src/model/public_types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ export interface MultiFactorUser {
795795
* ```
796796
*
797797
* @param option - The multi-factor option to unenroll.
798-
* @returns - A promise which resolves when the unenroll operation is complete.
798+
* @returns - A `Promise` which resolves when the unenroll operation is complete.
799799
*/
800800
unenroll(option: MultiFactorInfo | string): Promise<void>;
801801
}

packages-exp/remote-config-exp/src/api.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ export function getRemoteConfig(app: FirebaseApp = getApp()): RemoteConfig {
4545
/**
4646
* Makes the last fetched config available to the getters.
4747
* @param remoteConfig - The {@link RemoteConfig} instance.
48-
* @returns A promise which resolves to true if the current call activated the fetched configs.
49-
* If the fetched configs were already activated, the promise will resolve to false.
48+
* @returns A `Promise` which resolves to true if the current call activated the fetched configs.
49+
* If the fetched configs were already activated, the `Promise` will resolve to false.
5050
*
5151
* @public
5252
*/
@@ -77,7 +77,7 @@ export async function activate(remoteConfig: RemoteConfig): Promise<boolean> {
7777
* Ensures the last activated config are available to the getters.
7878
* @param remoteConfig - The {@link RemoteConfig} instance.
7979
*
80-
* @returns A promise that resolves when the last activated config is available to the getters.
80+
* @returns A `Promise` that resolves when the last activated config is available to the getters.
8181
* @public
8282
*/
8383
export function ensureInitialized(remoteConfig: RemoteConfig): Promise<void> {

packages-exp/remote-config-exp/src/api2.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ import { getModularInstance } from '@firebase/util';
2727
*
2828
* @param remoteConfig - The {@link RemoteConfig} instance.
2929
*
30-
* @returns A promise which resolves to true if the current call activated the fetched configs.
31-
* If the fetched configs were already activated, the promise will resolve to false.
30+
* @returns A `Promise` which resolves to true if the current call activated the fetched configs.
31+
* If the fetched configs were already activated, the `Promise` will resolve to false.
3232
*
3333
* @public
3434
*/

packages/database/src/exp/Reference_impl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ export function update(ref: DatabaseReference, values: object): Promise<void> {
803803
* Gets the most up-to-date result for this query.
804804
*
805805
* @param query - The query to run.
806-
* @returns A promise which resolves to the resulting DataSnapshot if a value is
806+
* @returns A `Promise` which resolves to the resulting DataSnapshot if a value is
807807
* available, or rejects if the client is unable to return a value (e.g., if the
808808
* server is unreachable and there is nothing cached).
809809
*/

packages/database/src/exp/Transaction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export class TransactionResult {
8888
* transaction will be aborted and the data at this location will not be
8989
* modified.
9090
* @param options - An options object to configure transactions.
91-
* @returns A promise that can optionally be used instead of the `onComplete`
91+
* @returns A `Promise` that can optionally be used instead of the `onComplete`
9292
* callback to handle success and failure.
9393
*/
9494
export function runTransaction(

packages/firestore/src/exp/database.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ export function configureFirestore(firestore: Firestore): void {
226226
* @param firestore - The {@link Firestore} instance to enable persistence for.
227227
* @param persistenceSettings - Optional settings object to configure
228228
* persistence.
229-
* @returns A promise that represents successfully enabling persistent storage.
229+
* @returns A `Promise` that represents successfully enabling persistent storage.
230230
*/
231231
export function enableIndexedDbPersistence(
232232
firestore: Firestore,
@@ -270,7 +270,7 @@ export function enableIndexedDbPersistence(
270270
* persistence implementation.
271271
*
272272
* @param firestore - The {@link Firestore} instance to enable persistence for.
273-
* @returns A promise that represents successfully enabling persistent
273+
* @returns A `Promise` that represents successfully enabling persistent
274274
* storage.
275275
*/
276276
export function enableMultiTabIndexedDbPersistence(
@@ -384,7 +384,7 @@ function canFallbackFromIndexedDbError(
384384
* recommend not enabling persistence at all.
385385
*
386386
* @param firestore - The {@link Firestore} instance to clear persistence for.
387-
* @returns A promise that is resolved when the persistent storage is
387+
* @returns A `Promise` that is resolved when the persistent storage is
388388
* cleared. Otherwise, the promise is rejected with an error.
389389
*/
390390
export function clearIndexedDbPersistence(firestore: Firestore): Promise<void> {
@@ -423,7 +423,7 @@ export function clearIndexedDbPersistence(firestore: Firestore): Promise<void> {
423423
* Any outstanding `waitForPendingWrites()` promises are rejected during user
424424
* changes.
425425
*
426-
* @returns A promise which resolves when all currently pending writes have been
426+
* @returns A `Promise` which resolves when all currently pending writes have been
427427
* acknowledged by the backend.
428428
*/
429429
export function waitForPendingWrites(firestore: Firestore): Promise<void> {
@@ -436,7 +436,7 @@ export function waitForPendingWrites(firestore: Firestore): Promise<void> {
436436
* Re-enables use of the network for this {@link Firestore} instance after a prior
437437
* call to {@link disableNetwork}.
438438
*
439-
* @returns A promise that is resolved once the network has been enabled.
439+
* @returns A `Promise` that is resolved once the network has been enabled.
440440
*/
441441
export function enableNetwork(firestore: Firestore): Promise<void> {
442442
firestore = cast(firestore, Firestore);
@@ -450,7 +450,7 @@ export function enableNetwork(firestore: Firestore): Promise<void> {
450450
* `getDoc()` or `getDocs()` calls will return results from cache, and any write
451451
* operations will be queued until the network is restored.
452452
*
453-
* @returns A promise that is resolved once the network has been disabled.
453+
* @returns A `Promise` that is resolved once the network has been disabled.
454454
*/
455455
export function disableNetwork(firestore: Firestore): Promise<void> {
456456
firestore = cast(firestore, Firestore);
@@ -477,7 +477,7 @@ export function disableNetwork(firestore: Firestore): Promise<void> {
477477
* of its resources or in combination with `clearIndexedDbPersistence()` to
478478
* ensure that all local state is destroyed between test runs.
479479
*
480-
* @returns A promise that is resolved when the instance has been successfully
480+
* @returns A `Promise` that is resolved when the instance has been successfully
481481
* terminated.
482482
*/
483483
export function terminate(firestore: Firestore): Promise<void> {

packages/firestore/src/exp/reference_impl.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export class ExpUserDataWriter extends AbstractUserDataWriter {
121121
* Reads the document referred to by this `DocumentReference` from cache.
122122
* Returns an error if the document is not currently cached.
123123
*
124-
* @returns A promise resolved with a `DocumentSnapshot` containing the
124+
* @returns A `Promise` resolved with a `DocumentSnapshot` containing the
125125
* current document contents.
126126
*/
127127
export function getDocFromCache<T>(
@@ -152,7 +152,7 @@ export function getDocFromCache<T>(
152152
* Reads the document referred to by this `DocumentReference` from the server.
153153
* Returns an error if the network is not available.
154154
*
155-
* @returns A promise resolved with a `DocumentSnapshot` containing the
155+
* @returns A `Promise` resolved with a `DocumentSnapshot` containing the
156156
* current document contents.
157157
*/
158158
export function getDocFromServer<T>(
@@ -175,7 +175,7 @@ export function getDocFromServer<T>(
175175
* you are offline and the server cannot be reached. To specify this behavior,
176176
* invoke {@link getDocsFromCache} or {@link getDocsFromServer}.
177177
*
178-
* @returns A promise that will be resolved with the results of the query.
178+
* @returns A `Promise` that will be resolved with the results of the query.
179179
*/
180180
export function getDocs<T>(query: Query<T>): Promise<QuerySnapshot<T>> {
181181
query = cast<Query<T>>(query, Query);
@@ -196,7 +196,7 @@ export function getDocs<T>(query: Query<T>): Promise<QuerySnapshot<T>> {
196196
* Executes the query and returns the results as a `QuerySnapshot` from cache.
197197
* Returns an error if the document is not currently cached.
198198
*
199-
* @returns A promise that will be resolved with the results of the query.
199+
* @returns A `Promise` that will be resolved with the results of the query.
200200
*/
201201
export function getDocsFromCache<T>(
202202
query: Query<T>
@@ -215,7 +215,7 @@ export function getDocsFromCache<T>(
215215
* Executes the query and returns the results as a `QuerySnapshot` from the
216216
* server. Returns an error if the network is not available.
217217
*
218-
* @returns A promise that will be resolved with the results of the query.
218+
* @returns A `Promise` that will be resolved with the results of the query.
219219
*/
220220
export function getDocsFromServer<T>(
221221
query: Query<T>
@@ -238,7 +238,7 @@ export function getDocsFromServer<T>(
238238
*
239239
* @param reference - A reference to the document to write.
240240
* @param data - A map of the fields and values for the document.
241-
* @returns A promise resolved once the data has been successfully written
241+
* @returns A `Promise` resolved once the data has been successfully written
242242
* to the backend (note that it won't resolve while you're offline).
243243
*/
244244
export function setDoc<T>(
@@ -297,7 +297,7 @@ export function setDoc<T>(
297297
* @param data - An object containing the fields and values with which to
298298
* update the document. Fields can contain dots to reference nested fields
299299
* within the document.
300-
* @returns A promise resolved once the data has been successfully written
300+
* @returns A `Promise` resolved once the data has been successfully written
301301
* to the backend (note that it won't resolve while you're offline).
302302
*/
303303
export function updateDoc(
@@ -316,7 +316,7 @@ export function updateDoc(
316316
* @param field - The first field to update.
317317
* @param value - The first value.
318318
* @param moreFieldsAndValues - Additional key value pairs.
319-
* @returns A promise resolved once the data has been successfully written
319+
* @returns A `Promise` resolved once the data has been successfully written
320320
* to the backend (note that it won't resolve while you're offline).
321321
*/
322322
export function updateDoc(
@@ -387,7 +387,7 @@ export function deleteDoc(
387387
*
388388
* @param reference - A reference to the collection to add this document to.
389389
* @param data - An Object containing the data for the new document.
390-
* @returns A promise resolved with a `DocumentReference` pointing to the
390+
* @returns A `Promise` resolved with a `DocumentReference` pointing to the
391391
* newly created document after it has been written to the backend (Note that it
392392
* won't resolve while you're offline).
393393
*/

packages/firestore/src/lite/database.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ export function connectFirestoreEmulator(
303303
* ensure that all local state is destroyed between test runs.
304304
*
305305
* @param firestore - The `Firestore` instance to terminate.
306-
* @returns A promise that is resolved when the instance has been successfully
306+
* @returns A `Promise` that is resolved when the instance has been successfully
307307
* terminated.
308308
*/
309309
export function terminate(firestore: Firestore): Promise<void> {

packages/firestore/src/lite/reference_impl.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ export function getDocs<T>(query: Query<T>): Promise<QuerySnapshot<T>> {
192192
*
193193
* @param reference - A reference to the document to write.
194194
* @param data - A map of the fields and values for the document.
195-
* @returns A promise resolved once the data has been successfully written
195+
* @returns A `Promise` resolved once the data has been successfully written
196196
* to the backend.
197197
*/
198198
export function setDoc<T>(
@@ -212,7 +212,7 @@ export function setDoc<T>(
212212
* @param reference - A reference to the document to write.
213213
* @param data - A map of the fields and values for the document.
214214
* @param options - An object to configure the set behavior.
215-
* @returns A promise resolved once the data has been successfully written
215+
* @returns A `Promise` resolved once the data has been successfully written
216216
* to the backend.
217217
*/
218218
export function setDoc<T>(
@@ -261,7 +261,7 @@ export function setDoc<T>(
261261
* @param data - An object containing the fields and values with which to
262262
* update the document. Fields can contain dots to reference nested fields
263263
* within the document.
264-
* @returns A promise resolved once the data has been successfully written
264+
* @returns A `Promise` resolved once the data has been successfully written
265265
* to the backend.
266266
*/
267267
export function updateDoc(
@@ -285,7 +285,7 @@ export function updateDoc(
285285
* @param field - The first field to update.
286286
* @param value - The first value.
287287
* @param moreFieldsAndValues - Additional key value pairs.
288-
* @returns A promise resolved once the data has been successfully written
288+
* @returns A `Promise` resolved once the data has been successfully written
289289
* to the backend.
290290
*/
291291
export function updateDoc(
@@ -344,7 +344,7 @@ export function updateDoc(
344344
* until the client is online, use the full Firestore SDK.
345345
*
346346
* @param reference - A reference to the document to delete.
347-
* @returns A promise resolved once the document has been successfully
347+
* @returns A `Promise` resolved once the document has been successfully
348348
* deleted from the backend.
349349
*/
350350
export function deleteDoc(
@@ -368,7 +368,7 @@ export function deleteDoc(
368368
*
369369
* @param reference - A reference to the collection to add this document to.
370370
* @param data - An Object containing the data for the new document.
371-
* @returns A promise resolved with a `DocumentReference` pointing to the
371+
* @returns A `Promise` resolved with a `DocumentReference` pointing to the
372372
* newly created document after it has been written to the backend.
373373
*/
374374
export function addDoc<T>(

packages/firestore/src/lite/write_batch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ export class WriteBatch {
205205
* write fails. If you would like to see local modifications or buffer writes
206206
* until the client is online, use the full Firestore SDK.
207207
*
208-
* @returns A promise resolved once all of the writes in the batch have been
208+
* @returns A `Promise` resolved once all of the writes in the batch have been
209209
* successfully written to the backend as an atomic unit (note that it won't
210210
* resolve while you're offline).
211211
*/

packages/firestore/src/local/persistence.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ export interface Persistence {
235235
* be acquired and the returned promise will be rejected with a
236236
* FAILED_PRECONDITION error.
237237
* @param transactionOperation - The operation to run inside a transaction.
238-
* @returns A promise that is resolved once the transaction completes.
238+
* @returns A `Promise` that is resolved once the transaction completes.
239239
*/
240240
runTransaction<T>(
241241
action: string,

packages/firestore/src/local/simple_db.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export class SimpleDbTransaction {
5555
private aborted = false;
5656

5757
/**
58-
* A promise that resolves with the result of the IndexedDb transaction.
58+
* A `Promise` that resolves with the result of the IndexedDb transaction.
5959
*/
6060
private readonly completionDeferred = new Deferred<void>();
6161

packages/storage/compat/reference.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ export class ReferenceCompat
185185
}
186186

187187
/**
188-
* A promise that resolves with the metadata for this object. If this
188+
* A `Promise` that resolves with the metadata for this object. If this
189189
* object doesn't exist or metadata cannot be retreived, the promise is
190190
* rejected.
191191
*/
@@ -198,7 +198,7 @@ export class ReferenceCompat
198198
* @param metadata - The new metadata for the object.
199199
* Only values that have been explicitly set will be changed. Explicitly
200200
* setting a value to null will remove the metadata.
201-
* @returns A promise that resolves
201+
* @returns A `Promise` that resolves
202202
* with the new metadata for this object.
203203
* @see firebaseStorage.Reference.prototype.getMetadata
204204
*/
@@ -212,7 +212,7 @@ export class ReferenceCompat
212212
}
213213

214214
/**
215-
* @returns A promise that resolves with the download
215+
* @returns A `Promise` that resolves with the download
216216
* URL for this object.
217217
*/
218218
getDownloadURL(): Promise<string> {
@@ -221,7 +221,7 @@ export class ReferenceCompat
221221

222222
/**
223223
* Deletes the object at this location.
224-
* @returns A promise that resolves if the deletion succeeds.
224+
* @returns A `Promise` that resolves if the deletion succeeds.
225225
*/
226226
delete(): Promise<void> {
227227
this._throwIfRoot('delete');

packages/storage/exp/api.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export function uploadBytesResumable(
132132
}
133133

134134
/**
135-
* A promise that resolves with the metadata for this object. If this
135+
* A `Promise` that resolves with the metadata for this object. If this
136136
* object doesn't exist or metadata cannot be retreived, the promise is
137137
* rejected.
138138
* @public
@@ -150,7 +150,7 @@ export function getMetadata(ref: StorageReference): Promise<FullMetadata> {
150150
* @param metadata - The new metadata for the object.
151151
* Only values that have been explicitly set will be changed. Explicitly
152152
* setting a value to null will remove the metadata.
153-
* @returns A promise that resolves with the new metadata for this object.
153+
* @returns A `Promise` that resolves with the new metadata for this object.
154154
*/
155155
export function updateMetadata(
156156
ref: StorageReference,
@@ -180,7 +180,7 @@ export function updateMetadata(
180180
*
181181
* @param ref - {@link StorageReference} to get list from.
182182
* @param options - See {@link ListOptions} for details.
183-
* @returns A promise that resolves with the items and prefixes.
183+
* @returns A `Promise` that resolves with the items and prefixes.
184184
* `prefixes` contains references to sub-folders and `items`
185185
* contains references to objects in this folder. `nextPageToken`
186186
* can be used to get the rest of the results.
@@ -207,7 +207,7 @@ export function list(
207207
* @public
208208
* @param ref - {@link StorageReference} to get list from.
209209
*
210-
* @returns A promise that resolves with all the items and prefixes under
210+
* @returns A `Promise` that resolves with all the items and prefixes under
211211
* the current storage reference. `prefixes` contains references to
212212
* sub-directories and `items` contains references to objects in this
213213
* folder. `nextPageToken` is never returned.
@@ -221,7 +221,7 @@ export function listAll(ref: StorageReference): Promise<ListResult> {
221221
* Returns the download URL for the given {@link StorageReference}.
222222
* @public
223223
* @param ref - {@link StorageReference} to get the download URL for.
224-
* @returns A promise that resolves with the download
224+
* @returns A `Promise` that resolves with the download
225225
* URL for this object.
226226
*/
227227
export function getDownloadURL(ref: StorageReference): Promise<string> {
@@ -233,7 +233,7 @@ export function getDownloadURL(ref: StorageReference): Promise<string> {
233233
* Deletes the object at this location.
234234
* @public
235235
* @param ref - {@link StorageReference} for object to delete.
236-
* @returns A promise that resolves if the deletion succeeds.
236+
* @returns A `Promise` that resolves if the deletion succeeds.
237237
*/
238238
export function deleteObject(ref: StorageReference): Promise<void> {
239239
ref = getModularInstance(ref);

0 commit comments

Comments
 (0)