File tree Expand file tree Collapse file tree 4 files changed +12
-12
lines changed
androidMain/kotlin/dev/teamhub/firebase/functions
commonMain/kotlin/dev/teamhub/firebase/functions
iosMain/kotlin/dev/teamhub/firebase/functions
jsMain/kotlin/dev/teamhub/firebase/functions Expand file tree Collapse file tree 4 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -31,12 +31,12 @@ actual class FirebaseFunctions internal constructor(val android: com.google.fire
3131}
3232
3333actual class HttpsCallableReference internal constructor(val android : com.google.firebase.functions.HttpsCallableReference ) {
34- actual suspend fun call () = HttpsCallableResult (android.call().await())
34+ actual suspend operator fun invoke () = HttpsCallableResult (android.call().await())
3535
36- actual suspend fun call (data : Any ) =
36+ actual suspend operator fun invoke (data : Any ) =
3737 HttpsCallableResult (android.call(encode(data)).await())
3838
39- actual suspend fun <T > call (strategy : SerializationStrategy <T >, data : T ) =
39+ actual suspend operator fun <T > invoke (strategy : SerializationStrategy <T >, data : T ) =
4040 HttpsCallableResult (android.call(encode(strategy, data)).await())
4141}
4242
Original file line number Diff line number Diff line change @@ -17,9 +17,9 @@ expect class FirebaseFunctions {
1717
1818expect class HttpsCallableReference {
1919 @ImplicitReflectionSerializer
20- suspend fun call (data : Any ): HttpsCallableResult
21- suspend fun <T > call (strategy : SerializationStrategy <T >, data : T ): HttpsCallableResult
22- suspend fun call (): HttpsCallableResult
20+ suspend operator fun invoke (data : Any ): HttpsCallableResult
21+ suspend operator fun <T > invoke (strategy : SerializationStrategy <T >, data : T ): HttpsCallableResult
22+ suspend operator fun invoke (): HttpsCallableResult
2323}
2424
2525expect class HttpsCallableResult {
Original file line number Diff line number Diff line change @@ -33,12 +33,12 @@ actual class FirebaseFunctions internal constructor(val ios: FIRFunctions) {
3333}
3434
3535actual class HttpsCallableReference internal constructor(val ios : FIRHTTPSCallable ) {
36- actual suspend fun call () = HttpsCallableResult (ios.awaitResult { callWithCompletion(it) })
36+ actual suspend operator fun invoke () = HttpsCallableResult (ios.awaitResult { callWithCompletion(it) })
3737
38- actual suspend fun call (data : Any ) =
38+ actual suspend operator fun invoke (data : Any ) =
3939 HttpsCallableResult (ios.awaitResult { callWithObject(encode(data), it) })
4040
41- actual suspend fun <T > call (strategy : SerializationStrategy <T >, data : T ) =
41+ actual suspend operator fun <T > invoke (strategy : SerializationStrategy <T >, data : T ) =
4242 HttpsCallableResult (ios.awaitResult { callWithObject(encode(strategy, data), it) })
4343}
4444
Original file line number Diff line number Diff line change @@ -30,13 +30,13 @@ actual class FirebaseFunctions internal constructor(val js: firebase.functions.F
3030@Suppress(" UNCHECKED_CAST" )
3131actual class HttpsCallableReference internal constructor(val js : firebase.functions.HttpsCallable ) {
3232
33- actual suspend fun call () =
33+ actual suspend operator fun invoke () =
3434 rethrow { HttpsCallableResult (js().await()) }
3535
36- actual suspend fun call (data : Any ) =
36+ actual suspend operator fun invoke (data : Any ) =
3737 rethrow { HttpsCallableResult (js(encode(data)).await()) }
3838
39- actual suspend fun <T > call (strategy : SerializationStrategy <T >, data : T ) =
39+ actual suspend operator fun <T > invoke (strategy : SerializationStrategy <T >, data : T ) =
4040 rethrow { HttpsCallableResult (js(encode(strategy, data)).await()) }
4141}
4242
You can’t perform that action at this time.
0 commit comments