Skip to content

Commit

Permalink
Allow undefined callbacks in Storage Observer (#3224)
Browse files Browse the repository at this point in the history
  • Loading branch information
schmidt-sebastian committed Jul 9, 2020
1 parent 308f020 commit 9c409ea
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .changeset/popular-cups-melt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"firebase": patch
"@firebase/storage-types": patch
"@firebase/storage": patch
---

[fix] Updated the TypeScript types for all APIs using Observers to allow callback omission.
2 changes: 1 addition & 1 deletion packages/firebase/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7579,7 +7579,7 @@ declare namespace firebase.storage {
on(
event: firebase.storage.TaskEvent,
nextOrObserver?:
| firebase.Observer<UploadTaskSnapshot>
| Partial<firebase.Observer<UploadTaskSnapshot>>
| null
| ((a: UploadTaskSnapshot) => any),
error?: ((a: Error) => any) | null,
Expand Down
2 changes: 1 addition & 1 deletion packages/storage-types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export interface UploadTask {
on(
event: TaskEvent,
nextOrObserver?:
| Observer<UploadTaskSnapshot>
| Partial<Observer<UploadTaskSnapshot>>
| null
| ((a: UploadTaskSnapshot) => any),
error?: ((a: Error) => any) | null,
Expand Down

0 comments on commit 9c409ea

Please sign in to comment.