Skip to content

Commit 24f9305

Browse files
add on for upload task and storage error
1 parent 74c3b93 commit 24f9305

File tree

1 file changed

+8
-0
lines changed
  • firebase-common/src/jsMain/kotlin/dev/gitlive/firebase

1 file changed

+8
-0
lines changed

firebase-common/src/jsMain/kotlin/dev/gitlive/firebase/externals.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,7 @@ external object firebase {
588588
fun cancel(): Boolean
589589
fun pause(): Boolean
590590
fun resume(): Boolean
591+
fun on(event: String, next: (snapshot: UploadTaskSnapshot) -> Unit, error: (a: FirebaseStorageError) -> Unit, complete: () -> Unit): () -> Unit
591592
}
592593

593594
open class UploadTaskSnapshot {
@@ -599,6 +600,13 @@ external object firebase {
599600
val totalBytes: Number
600601
}
601602

603+
open class FirebaseStorageError {
604+
val code: String
605+
val message: String
606+
val name: String
607+
val stack: String?
608+
}
609+
602610
}
603611

604612
fun remoteConfig(app: App? = definedExternally): remoteConfig.RemoteConfig

0 commit comments

Comments
 (0)