Jonathan Ellis
05/26/2022, 4:06 PMjs("foo") as Type
the best option? What about going the other way around, do I need to generate js("foo = [js string representation]")
? This is easy for primitives but more tedious for other objectsephemient
05/26/2022, 4:12 PMexternal var foo: Type
Jonathan Ellis
05/26/2022, 4:19 PMJonathan Ellis
05/26/2022, 5:42 PMJonathan Ellis
05/26/2022, 5:42 PM<script>
let foo = 0.0
let bar = {}
</script>
Jonathan Ellis
05/26/2022, 5:42 PMexternal var foo: Double
external var bar: MutableMap<String, Any>
Jonathan Ellis
05/26/2022, 5:42 PMfoo = 1.0
bar["test"] = "a"
Jonathan Ellis
05/26/2022, 5:42 PMJonathan Ellis
05/26/2022, 5:42 PMJonathan Ellis
05/26/2022, 5:42 PMUncaught TypeError: tmp0_set_0.put_3mhbri_k$ is not a function
ephemient
05/26/2022, 5:50 PMMutableMap
is a Kotlin type, but {}
in JS is notephemient
05/26/2022, 5:52 PMexternal val bar: dynamic
bar["test"] = "a"
Jonathan Ellis
05/26/2022, 5:53 PMBig Chungus
05/26/2022, 6:07 PMJonathan Ellis
05/26/2022, 6:09 PMephemient
05/26/2022, 6:09 PMdynamic
lets you write bar.test = "a"
just like you can in JS, which you could consider a plus and/or a minusJonathan Ellis
05/26/2022, 6:10 PMBig Chungus
05/26/2022, 6:27 PMBig Chungus
05/26/2022, 6:29 PMJonathan Ellis
05/26/2022, 6:32 PM