jkbbwr
09/15/2018, 11:52 PMCan't access class 'EventEmitter' marked with @JsModule annotation from non-modular project
gildor
09/17/2018, 11:18 PMjosephivie
09/18/2018, 3:27 AMdependencies{}
block to be used in the resolve
block inside webpack.config.js
?josephivie
09/18/2018, 3:31 AMAllan Wang
09/19/2018, 1:47 AMDico
09/19/2018, 5:00 AMZukkari
09/19/2018, 1:30 PMfabianterhorst
09/20/2018, 4:28 PMfabianterhorst
09/20/2018, 5:04 PMprivate external fun require(module: String): MyModule
fun get(): MyModule {
return require("myModule")
}
external interface MyModule {
fun myMethod(...)
}
Hamza
09/23/2018, 10:00 AMHamza
09/23/2018, 12:04 PMHamza
09/23/2018, 2:01 PMnew
type of a variable?
so for instance, if i have this code:
val discord = require("discord.js")
// how can i declare
val bot = js("new discord.Client();")
without losing type safety, as the new
keyword doesn’t exist. is it in the kotlinjs lib?
omitting the word throws an errordawitt
09/24/2018, 11:59 AMTypeError: ArrayList_init_0 is not a function
runtime error.
console.log("here")
val jsArray = js("[1,2,3]") as Array<Int>
val result = jsArray.filter { it < 5 }
The project compiles without problems and Intellij shows no warnings.
Has anybody else experienced similar issues or has any ideas how to resolve this?sdeleuze
09/26/2018, 10:05 PMfunctionaldude
09/28/2018, 8:32 AMcreate-react-app
script but it is already “ejected”) and i’m trying to write an IndexedDB wrapper. I need the kotlinx.coroutines.core
library but somehow I can’t add it to the project as dependency… I added it as dependency to my package.json
, it seems to be installed (the files are already in the node_modules folder) but autocompletion does not work and I can’t use any functions from it. What am I doing wrong?bashor
09/28/2018, 1:21 PMApart from implementing requested business features and regulatory requirements the team is focusing in consolidating all frontend technologies into one HTML/KotlinJS solution. Several applications have already been migrated but many are waiting. The development is fully strongly typed including Client to Server communication. Kotlin Type Safe Builders are used for layout construction. Selenium is used for test automation.https://barclays.taleo.net/careersection/2/jobdetail.ftl?job=90164661
spierce7
10/02/2018, 3:06 AMrobstoll
10/04/2018, 2:38 PMgbaldeck
10/04/2018, 3:05 PMsdeleuze
10/04/2018, 3:36 PMNavrocky Vlad
10/07/2018, 4:37 PMtarek
10/07/2018, 5:52 PMlib
folder with all dependencies (kotlin.js
etc.) but not when building from Gradle assemble
(I find only the compiled Kotlin as js files) ?gbaldeck
10/07/2018, 11:11 PMcoletz
10/08/2018, 8:10 AMhallvard
10/08/2018, 11:31 AMhallvard
10/08/2018, 1:52 PMFile file ->
into simply file ->
). When this task is performed, I find the kotlin.js file in the lib directory, as expected. But I have a hard time finding out how to make my sourceSet jsMain
dependOn this. The `dependsOn`clause is no good here ("Could not find method dependsOn() for arguments [task ':linkJs'] on target js (js) of type org.jetbrains.kotlin.gradle.plugin.mpp.KotlinOnlyTarget."). Will examine further tomorrow.coletz
10/08/2018, 5:23 PMconst browser = await puppeteer.launch()
.
My issue is that I can't use await with kotlin js, and I don't know if "await" is just syntactic sugar for a callback (sort of stuff done on Java with coroutines)coletz
10/09/2018, 3:11 PMconst jsdom = require("jsdom"); const { JSDOM } = jsdom;
. For what I've understood, this is equivalent to const JSDOM = require("jsdom").JSDOM
. Anyway when trying to use it with kotlin I'm having some issue since JSDOM
is a constructor, but in kotlin is called as a function (and thus it fails with Class constructor JSDOM cannot be invoked without 'new'
. Is it possible to call JSDOM as a constructor in any way? I've tried so many stuff, even using js(require(jsdom).JSDOM).window as Window
but it fails with ReferenceError: Window is not defined
ankushg
10/09/2018, 10:18 PM@Keep
annotation for Kotlin/JS projects that automatically whitelists things from being DCEed? Similar to how Android has @Keep
for ProGuard?gbaldeck
10/10/2018, 3:04 AMgbaldeck
10/10/2018, 3:04 AMsource-map-loader
hallvard
10/10/2018, 7:39 AMgbaldeck
10/10/2018, 2:44 PMhallvard
10/10/2018, 5:13 PMInvalid publication 'kotlinMultiplatform': groupId cannot be empty.
groupId
must be specified allright, because the jvm
and js
targets are indeed published to my maven server just before this error occurs ...gbaldeck
10/10/2018, 5:19 PMhallvard
10/10/2018, 5:25 PMjs
and jvm
defined in the same, top-level gradle file), and mostly, it works like a charm. So it's not a big deal. But that said, I would like gradle publish
to work properly too ... Do you use the maven-publish
plugin? Should I define somehow that it is OK not to publish the common
source set? That's my theory, in fact, that gradle tries to publish stuff from jsMain
, then from jvmMain
and finally from commonMain
... But I don't know where to interrupt this behaviour ...gbaldeck
10/10/2018, 6:56 PM