Skip to content

Commit b46d974

Browse files
fix(comment): Adding comment on TS compiler
1 parent b263e6b commit b46d974

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/storage/task.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,8 @@ export class UploadTask {
497497
* @param onRejected The rejection callback.
498498
*/
499499
then<U>(onFulfilled?: ((value: UploadTaskSnapshot) => U | PromiseLike<U>) | null, onRejected?: ((error: any) => U | PromiseLike<U>) | null): Promise<U> {
500+
// These casts are needed so that TypeScript can infer the types of the
501+
// resulting Promise.
500502
return this.promise_.then<U>(
501503
(onFulfilled as (value: UploadTaskSnapshot) => U | PromiseLike<U>),
502504
(onRejected as ((error: any) => PromiseLike<never>) | null));

0 commit comments

Comments
 (0)