Skip to content

Commit 92f9e50

Browse files
Fix Compat
1 parent 187ef92 commit 92f9e50

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/storage-compat/src/task.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
import {
1919
UploadTask,
20-
FirebaseStorageError,
20+
StorageError,
2121
UploadTaskSnapshot,
2222
TaskEvent,
2323
StorageObserver
@@ -48,7 +48,7 @@ export class UploadTaskCompat implements types.UploadTask, Compat<UploadTask> {
4848

4949
then(
5050
onFulfilled?: ((a: UploadTaskSnapshotCompat) => unknown) | null,
51-
onRejected?: ((a: FirebaseStorageError) => unknown) | null
51+
onRejected?: ((a: StorageError) => unknown) | null
5252
): Promise<unknown> {
5353
return this._delegate.then(snapshot => {
5454
if (onFulfilled) {
@@ -65,7 +65,7 @@ export class UploadTaskCompat implements types.UploadTask, Compat<UploadTask> {
6565
| types.StorageObserver<UploadTaskSnapshotCompat>
6666
| null
6767
| ((a: UploadTaskSnapshotCompat) => unknown),
68-
error?: (error: FirebaseStorageError) => void | null,
68+
error?: (error: StorageError) => void | null,
6969
completed?: () => void | null
7070
): Unsubscribe | Subscribe<UploadTaskSnapshotCompat> {
7171
let wrappedNextOrObserver:
@@ -123,7 +123,7 @@ export type NextFn<T> = (value: T) => void;
123123
* A function that is called with a `FirebaseStorageError`
124124
* if the event stream ends due to an error.
125125
*/
126-
export type ErrorFn = (error: FirebaseStorageError) => void;
126+
export type ErrorFn = (error: StorageError) => void;
127127

128128
/**
129129
* A function that is called if the event stream ends normally.

0 commit comments

Comments
 (0)