Skip to content

Commit 79e4635

Browse files
committed
Split externals
1 parent 4ff80b2 commit 79e4635

File tree

3 files changed

+19
-11
lines changed

3 files changed

+19
-11
lines changed

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,4 @@
44

55
package dev.gitlive.firebase
66

7-
import dev.gitlive.firebase.externals.database.DataSnapshot
8-
import dev.gitlive.firebase.externals.functions.HttpsCallable
9-
import dev.gitlive.firebase.externals.functions.HttpsCallableResult
10-
import kotlin.js.Promise
11-
12-
typealias ChangeSnapshotCallback = (data: DataSnapshot, previousChildName: String?) -> Unit
13-
typealias ValueSnapshotCallback = (data: DataSnapshot) -> Unit
14-
typealias CancelCallback = (error: Throwable) -> Unit
157
typealias Unsubscribe = () -> Unit
16-
17-
operator fun HttpsCallable.invoke() = asDynamic()() as Promise<HttpsCallableResult>
18-
operator fun HttpsCallable.invoke(data: Any?) = asDynamic()(data) as Promise<HttpsCallableResult>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
* Copyright (c) 2020 GitLive Ltd. Use of this source code is governed by the Apache 2.0 license.
3+
*/
4+
5+
package dev.gitlive.firebase.externals.database
6+
7+
typealias ChangeSnapshotCallback = (data: DataSnapshot, previousChildName: String?) -> Unit
8+
typealias ValueSnapshotCallback = (data: DataSnapshot) -> Unit
9+
typealias CancelCallback = (error: Throwable) -> Unit
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
* Copyright (c) 2020 GitLive Ltd. Use of this source code is governed by the Apache 2.0 license.
3+
*/
4+
5+
package dev.gitlive.firebase.externals.functions
6+
7+
import kotlin.js.Promise
8+
9+
operator fun HttpsCallable.invoke() = asDynamic()() as Promise<HttpsCallableResult>
10+
operator fun HttpsCallable.invoke(data: Any?) = asDynamic()(data) as Promise<HttpsCallableResult>

0 commit comments

Comments
 (0)