Skip to content

Commit 9681cf4

Browse files
committed
Used Json? instead od dynamic for better clarity
1 parent e5af67d commit 9681cf4

File tree

2 files changed

+3
-2
lines changed
  • firebase-auth/src/jsMain/kotlin/dev/gitlive/firebase/auth

2 files changed

+3
-2
lines changed

firebase-auth/src/jsMain/kotlin/dev/gitlive/firebase/auth/auth.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import kotlinx.coroutines.await
1313
import kotlinx.coroutines.channels.awaitClose
1414
import kotlinx.coroutines.flow.Flow
1515
import kotlinx.coroutines.flow.callbackFlow
16+
import kotlin.js.Json
1617
import kotlin.js.json
1718
import dev.gitlive.firebase.auth.externals.AuthResult as JsAuthResult
1819
import dev.gitlive.firebase.auth.externals.AdditionalUserInfo as JsAdditionalUserInfo
@@ -131,7 +132,7 @@ public actual class AdditionalUserInfo(
131132
public actual val profile: Map<String, Any?>?
132133
get() = rethrow {
133134
val profile = js.profile ?: return@rethrow null
134-
val entries = js("Object.entries") as (dynamic) -> Array<Array<Any?>>
135+
val entries = js("Object.entries") as (Json) -> Array<Array<Any?>>
135136
return@rethrow entries
136137
.invoke(profile)
137138
.associate { entry -> entry[0] as String to entry[1] }

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public external interface AuthResult {
176176
public external interface AdditionalUserInfo {
177177
public val providerId: String?
178178
public val username: String?
179-
public val profile: dynamic
179+
public val profile: Json?
180180
public val newUser: Boolean
181181
}
182182

0 commit comments

Comments
 (0)