Samuel Cook
11/01/2019, 12:40 AMexternal class
so that code that uses them can be unit tested?Nikky
11/05/2019, 8:15 AMr.js
to bundle the kotlinjs output into a single file ?
ideally without the need to setup node or npm in the projectNikky
11/05/2019, 1:06 PMsdeleuze
11/05/2019, 5:55 PMFlow
used in a Kotlin/JS application configured with build.gradle.kts
and DCE without any JS configuration -> https://github.com/sdeleuze/spring-messenger/tree/step-4-kotlin-js/frontend. I hope Kotlin/JS team will update the documentation. The latest changes are going toward a good direction (getting rid of frontend plugin or JS configuration) but that's a pretty diffcult journey for now.sdeleuze
11/05/2019, 5:59 PMcjmartinkoski
11/07/2019, 1:40 PMhellman
11/09/2019, 10:44 AMhellman
11/09/2019, 10:48 AMzceejkr
11/09/2019, 7:09 PMval lam = { (a, b) ->
println("$a, $b")
}
lam(Pair(5, 3))
prints 5, undefined
But:
val lam = { pair ->
val a = pair.first
val b = pair.second
println("$a, $b")
}
lam(Pair(5, 3))
prints 5, 3
JoakimForslund
11/09/2019, 10:40 PMmodule {__esModule: true, Symbol(Symbol.toStringTag): "Module"}
The code that is supposted to be exported is from multiplatform common, but I also tried to export directly from the javascript target. What am I missing?avijitkarmakar
11/12/2019, 5:45 AMhellman
11/14/2019, 10:55 AMit.resume(result)
and it.resumeWithException(error)
Esakki
11/15/2019, 11:46 AMuliluckas
11/15/2019, 11:02 PM{
"dependencies": {
"xpc-connection": "sandeepmistry/node-xpc-connection#26/head"
},
"resolutions": {
"xpc-connection": "sandeepmistry/node-xpc-connection#26/head"
}
}
basher
11/18/2019, 11:24 PMbasher
11/19/2019, 4:07 AMRoy Nard
11/19/2019, 4:46 PMthana
11/20/2019, 10:11 AMthana
11/20/2019, 10:29 AMnpm assemble
.
We do this job manuall using the moowork npm plugin. But with 1.3.60 (and possibly already with 1.3.50) this step fails because the "main" modul's js file is packaged into a zip file.
Of course i could go an unzip the file so i have the file agian but that's tedious, of course.
Is there a way to leverage the new plugin's abilitys to assemble the npm package?Joffrey
11/20/2019, 3:48 PMwebstomp-client
NPM library. Kotlin just doesn't allow me to express this Javascript in a type safe way, because it believes it can't translate it to valid JS, which is not true.
Is there any workaround I could use?hellman
11/21/2019, 6:51 AMwindow
. That will throw a ReferenceError
, but since that isn’t exposed to the Kotlin/JS API, you have to catch Throwable
instead. Now you know if you’re running in the window or as a service workerthana
11/21/2019, 12:37 PM--inspect-brk
swoitch so i could debug broken testcode.
Is something similar possible in 1.3.(5|6)0?halirutan
11/21/2019, 3:35 PMFileReader
but I’m not sure it’s for reading local files. Is there any tutorial about this?shiraji
11/22/2019, 8:13 AMprocess.env.MY_VAR
. I managed to see process.env
but not process.env.MY_VAR
halirutan
11/22/2019, 11:07 AMdiv("App-header") {
attrs.onDragOverFunction = { event -> event.preventDefault() }
attrs.onDropFunction = ::filesDropped
but the onDropFunction
has the signature Event -> Unit
. I'm trying to follow some html5 JS tutorial and to access the files that were dropped, they use ev.dataTransfer
, but in Kotlin this is only available for DragEvent
. The problem is that the provided event
is not of type DragEvent
and something like this fails
private fun filesDropped(event: Event) {
console.log("Files dropped")
event.preventDefault()
val dragEvent = event as DragEvent
val items = dragEvent.dataTransfer?.items ?: return
Is there a simple example/tutorial how to do this in Kotlin?thana
11/22/2019, 12:53 PM@Test
fun testFoo() {
val a: Long = 6
val b: Long? = createFoo()
assertEquals(a, b)
}
fun createFoo(): Long? = if (true) 5 else null
fails with jsNodeTest
- that makes it impossible to make use of the new features 😞halirutan
11/24/2019, 1:07 AMhalirutan
11/24/2019, 1:09 AMspierce7
11/24/2019, 9:19 PMShan
11/24/2019, 11:09 PMexternal
class with a constructor? Getting a not defined
error when trying to run tests. Though I'm unsure if this is because of how I defined the constructor, or because of something else related to the class..
external class Keypair(keys: dynamic) {
//omitted for brevity
}
and the class I am trying to get it to find with the external
modifier
export class Keypair {
constructor(keys) {
//omitted
}
//omitted
}
Shan
11/24/2019, 11:09 PMexternal
class with a constructor? Getting a not defined
error when trying to run tests. Though I'm unsure if this is because of how I defined the constructor, or because of something else related to the class..
external class Keypair(keys: dynamic) {
//omitted for brevity
}
and the class I am trying to get it to find with the external
modifier
export class Keypair {
constructor(keys) {
//omitted
}
//omitted
}
Svyatoslav Kuzmich [JB]
11/25/2019, 12:51 PM@file:JsModule
annotation?turansky
11/25/2019, 11:44 PM