tgbotapi/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/popup/ScanQrPopupParams.kt

17 lines
311 B
Kotlin

package dev.inmo.tgbotapi.webapps.popup
import kotlin.js.json
external interface ScanQrPopupParams {
val text: String?
}
fun ScanQrPopupParams(
text: String? = null
) = json(
*listOfNotNull(
("text" to text).takeIf { text != null }
).toTypedArray()
).unsafeCast<ScanQrPopupParams>()